X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Fmda.t;h=35811ac6f19e9a103d338fc7a40c31dc0ede67f8;hp=99592b2d9e901874f9a271f512c1b943897808e5;hb=74a3206babe0572a1494500d21267a31873af7b0;hpb=4315455300e29e4ef0ea2f2d68bf4e86d261ae1d diff --git a/t/mda.t b/t/mda.t index 99592b2d..35811ac6 100644 --- a/t/mda.t +++ b/t/mda.t @@ -308,6 +308,25 @@ EOF my $cur = `git --git-dir=$maindir diff HEAD~1..HEAD`; like($cur, qr/this message would not be accepted without --no-precheck/, '--no-precheck delivered message anyways'); + + # try a message with multiple List-ID headers + $in = < +List-ID: <$list_id> +Message-ID: <2lids\@example> +Subject: two List-IDs +From: user +To: $addr +Date: Fri, 02 Oct 1993 00:00:00 +0000 + +EOF + ($out, $err) = ('', ''); + IPC::Run::run([$mda], \$in, \$out, \$err); + is($?, 0, 'mda OK with multiple List-Id matches'); + $cur = `git --git-dir=$maindir diff HEAD~1..HEAD`; + like($cur, qr/Message-ID: <2lids\@example>/, + 'multi List-ID match delivered'); + like($err, qr/multiple List-ID/, 'warned about multiple List-ID'); } done_testing();