diff --git a/MANIFEST b/MANIFEST index c2a49ad..6cf638f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -155,6 +155,7 @@ testmsgs/german.msg testmsgs/german.ref testmsgs/hdr-fakeout.msg testmsgs/hdr-fakeout.ref +testmsgs/hdr-fakeout-newmailtools-ref testmsgs/malformed-content-type-zip.msg testmsgs/multi-2evil.msg testmsgs/multi-2evil.ref diff --git a/t/Ref.t b/t/Ref.t index b3fc985..d39d20b 100644 --- a/t/Ref.t +++ b/t/Ref.t @@ -39,6 +39,10 @@ foreach my $refpath (@refpaths) { my $msgpath = $refpath; $msgpath =~ s/\.ref$/.msg/; # print STDERR " $msgpath\n"; + ### HACK HACK HACK: MailTools behaviour has changed!!! + if ($msgpath eq 'testmsgs/hdr-fakeout.msg' && $::Mail::Header::VERSION > 2.14) { + $refpath = 'testmsgs/hdr-fakeout-newmailtools-ref'; + } ### Get reference, as ref to array: my $ref = read_ref($refpath); if ($ref->{Parser}{Message}) { diff --git a/testmsgs/hdr-fakeout-newmailtools-ref b/testmsgs/hdr-fakeout-newmailtools-ref new file mode 100644 index 0000000..b6e9329 --- /dev/null +++ b/testmsgs/hdr-fakeout-newmailtools-ref @@ -0,0 +1,16 @@ +{ + "Parser" => { + "Message" => "testmsgs/hdr-fakeout.msg", + "ExtractNested" => 1, + "OutputToCore" => "0", + "Name" => "anonymous" + }, + "Msg" => { + "Subject" => "test message 1", + "Type" => "text/plain", + "To" => "\"Russell P. Sutherland\" ", + "From" => "\"Russell P. Sutherland\" ", + "Encoding" => "7bit" + } +} +