about summary refs log tree commit homepage
path: root/t/psgi_v2.t
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-23 20:29:24 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-27 02:34:20 +0000
commit007cb8774e7013e2aaca32003bbd1653e3d8582f (patch)
tree24645e152f6c386730dfdc9925b5dd5ca7740752 /t/psgi_v2.t
parent26895bbd94dc93b76274652f9ea35626fd63a5fa (diff)
downloadpublic-inbox-007cb8774e7013e2aaca32003bbd1653e3d8582f.tar.gz
This needs tests and further refinement, but current tests pass.
Diffstat (limited to 't/psgi_v2.t')
-rw-r--r--t/psgi_v2.t12
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/&lt;\Q$mid\E&gt;/s, "Message-ID $mid shown");
+        }
 });
 
 done_testing();