Konstantin Ryabitsev <[email protected]> wrote:
> Hello:
> 
> Running "make test" I get the following failures:
> 
> t/content_id.t ......... 1/?
> #   Failed test 'content_id does not mutate From:'
> #   at t/content_id.t line 29.
> #          got: '"Quoted N'Ame" <[email protected]>'
> #     expected: '"Quoted N\'Ame" <[email protected]>'

> Anything I can do to help troubleshoot this? The modules were installed
> from CPAN per the INSTALL file.

Which versions of perl, Email::MIME, Email::MIME::Encodings, and
Email::Simple are you running?

Does s/header_str_set/header_set/ work around the problem?
(if so, I think it might be E::M::Encodings...)

The following should improve the readability of the failure
messages, I got the order of is() args backwards and q() can be
more readable in source than ''.

--- a/t/content_id.t
+++ b/t/content_id.t
@@ -23,10 +23,10 @@ my $reload = content_id(Email::MIME->new($mime->as_string));
 is($orig, $reload, 'content_id matches after serialization');
 
 foreach my $h (qw(From To Cc)) {
-       my $n = '"Quoted N\'Ame" <[email protected]>';
+       my $n = q("Quoted N'Ame" <[email protected]>);
        $mime->header_str_set($h, "$n");
        my $q = content_id($mime);
-       is($n, $mime->header($h), "content_id does not mutate $h:");
+       is($mime->header($h), $n, "content_id does not mutate $h:");
        $mime->header_str_set($h, 'Quoted N\'Ame <[email protected]>');
        my $nq = content_id($mime);
        is($nq, $q, "quotes ignored in $h:");
--
unsubscribe: [email protected]
archive: https://public-inbox.org/meta/

Reply via email to