From 007cb8774e7013e2aaca32003bbd1653e3d8582f Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Fri, 23 Mar 2018 20:29:24 +0000 Subject: view: permalink (per-message) view shows multiple messages This needs tests and further refinement, but current tests pass. --- t/psgi_v2.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 't') 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(); -- cgit v1.2.3-24-ge0c7