Skip Menu |
 
Queue is disabled
This queue is disabled and you may not create new tickets in it. Disabled queues are usually because the distribution was merged with another or changed names. Sometimes they are the end result of a bad autocreate from PAUSE data before anyone noticed.
Report information
The Basics
Id: 45183
Status: resolved
Priority: 0/
Queue: Email-MIME-Creator

People
Owner: Nobody in particular
Requestors: GRAF [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: make test fails
Freshly set up perl 5.10.0 All modules current at 2009-04-21 . ~> perl -Ilib t/singlepart.t ok 1 - use Email::MIME::Creator; ok 2 - The object isa Email::MIME not ok 3 - as_string matches # Failed test 'as_string matches' # at t/singlepart.t line 46. # got: 'From: me # To: you # Subject: test # MIME-Version: 1.0 # Content-Transfer-Encoding: base64 # # ClRoaXMgaXMgbXkgc2luZ2xlcGFydCBtZXNzYWdlLgpJdCdzIGJhc2U2NCBlbmNvZGVkLgo= # ' # expected: 'From: me # To: you # Subject: test # MIME-Version: 1.0 # Content-Transfer-Encoding: base64 # # ClRoaXMgaXMgbXkgc2luZ2xlcGFydCBtZXNzYWdlLgpJdCdzIGJhc2U2NCBlbmNvZGVkLgo= # ' ok 4 - body matches 1..4 # Looks like you failed 1 test of 4. The difference between 'got' and 'expected' is a stray CR at the end: got: "From: me\nTo: you\nSubject: test\nMIME-Version: 1.0\nContent-Transfer-Encoding: base64\n\nClRoaXMgaXMgbXkgc2luZ2xlcGFydCBtZXNzYWdlLgpJdCdzIGJhc2U2NCBlbmNvZGVkLgo=\r\n" expected: "From: me\nTo: you\nSubject: test\nMIME-Version: 1.0\nContent-Transfer-Encoding: base64\n\nClRoaXMgaXMgbXkgc2luZ2xlcGFydCBtZXNzYWdlLgpJdCdzIGJhc2U2NCBlbmNvZGVkLgo=\n"
From: ddascalescu+perl [...] gmail.com
Download (untitled) / with headers
text/plain 143b
Show quoted text
> The difference between 'got' and 'expected' is a stray CR at the end:
Added patch to use Test::More so that whitespace like CRs is visible.
--- old\t\singlepart.t 2009-Jan-20 13:00:36 +++ new\t\singlepart.t 2009-Apr-22 18:54:53 @@ -1,3 +1,4 @@ use Test::More qw[no_plan]; +use Test::Differences; use strict; $^W = 1; @@ -41,45 +42,46 @@ # $expected_string =~ s/\n/\x0d\x0a/g; -is $email->as_string, $expected_string, 'as_string matches'; +eq_or_diff $email->as_string, $expected_string, 'as_string matches'; -is $email->body, $expected_body, 'body matches'; +eq_or_diff $email->body, $expected_body, 'body matches';
From: ddascalescu+perl [...] gmail.com
Download (untitled) / with headers
text/plain 151b
Show quoted text
> The difference between 'got' and 'expected' is a stray CR at the end:
Added patch to use Test::Differences, so that whitespace like CRs is visible.
--- old\t\singlepart.t 2009-Jan-20 13:00:36 +++ new\t\singlepart.t 2009-Apr-22 18:54:53 @@ -1,3 +1,4 @@ use Test::More qw[no_plan]; +use Test::Differences; use strict; $^W = 1; @@ -41,45 +42,46 @@ # $expected_string =~ s/\n/\x0d\x0a/g; -is $email->as_string, $expected_string, 'as_string matches'; +eq_or_diff $email->as_string, $expected_string, 'as_string matches'; -is $email->body, $expected_body, 'body matches'; +eq_or_diff $email->body, $expected_body, 'body matches';
fixed -- rjbs


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.