diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-23 20:29:24 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-27 02:34:20 +0000 |
commit | 007cb8774e7013e2aaca32003bbd1653e3d8582f (patch) | |
tree | 24645e152f6c386730dfdc9925b5dd5ca7740752 /t | |
parent | 26895bbd94dc93b76274652f9ea35626fd63a5fa (diff) | |
download | public-inbox-007cb8774e7013e2aaca32003bbd1653e3d8582f.tar.gz |
This needs tests and further refinement, but current tests pass.
Diffstat (limited to 't')
-rw-r--r-- | t/psgi_v2.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/psgi_v2.t b/t/psgi_v2.t index 1e45c263..eaa3218c 100644 --- a/t/psgi_v2.t +++ b/t/psgi_v2.t @@ -127,6 +127,18 @@ test_psgi(sub { $www->call(@_) }, sub { @from_ = ($raw =~ m/^From /mg); is(scalar(@from_), 3, 'three From_ lines in t.mbox.gz'); }; + + local $SIG{__WARN__} = 'DEFAULT'; + $res = $cb->(GET('/v2test/a-mid@b/')); + $raw = $res->content; + like($raw, qr/^hello world$/m, 'got first message'); + like($raw, qr/^hello world!$/m, 'got second message'); + like($raw, qr/^hello ghosts$/m, 'got third message'); + @from_ = ($raw =~ m/>From: /mg); + is(scalar(@from_), 3, 'three From: lines'); + foreach my $mid ('a-mid@b', $new_mid, $third) { + like($raw, qr/<\Q$mid\E>/s, "Message-ID $mid shown"); + } }); done_testing(); |