Skip Menu |
 

This queue is for tickets about the Data-Dump-Streamer CPAN distribution.

Report information
The Basics
Id: 44610
Status: resolved
Priority: 0/
Queue: Data-Dump-Streamer

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

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



Subject: [PATCH] t/madness.t fails under non-English locales
Hardcoding $! strings won't work.
Subject: t-madness.t.patch
--- t/madness.t~ 2009-03-24 01:20:35.000000000 +0100 +++ t/madness.t 2009-03-26 18:56:40.000000000 +0100 @@ -221,7 +221,7 @@ NV => 3.14159265358979, PV => "string", PV8 => "ab\ncd\x{20ac}\t", - PVM => $!, + PVM => 0+$!, # dualvar, force numeric context RV => \$., AR => [ 1..2 ], HR => { key => "value" }, @@ -232,7 +232,7 @@ OBJ => bless qr/("[^"]+")/,"Zorp", ); - same( $dump= $o->Data(\%hash)->Out, <<'EXPECT', "", $o); + my $expected7 = <<'EXPECT'; $HASH1 = { AR => [ 1, @@ -258,12 +258,17 @@ OBJ => bless( qr/("[^"]+")/, 'Zorp' ), PV => 'string', PV8 => "ab\ncd\x{20ac}\t", - PVM => 'Bad file descriptor', + PVM => ERRNO, RV => \do { my $v = undef }, UND => undef }; EXPECT + use Errno qw(); + my $errno = Errno::EBADF; + $expected7 =~ s[ERRNO][$errno]; + same( $dump= $o->Data(\%hash)->Out, $expected7, "", $o); + } __END__
Download (untitled) / with headers
text/plain 486b
Using $! in this context isn't guaranteed to work at all. According to perlvar, the value of $! is meaningful only immediately after a failure. Since #39060 has been resolved, t/madness.t is now failing because there is no error present: not ok 7 - # Failed test '' # at t/test_helper.pl line 90. -Expected +Result @26,26 (261) = PV8 => "ab\ncd\x{20ac}\t", - PVM => 'Bad file descriptor', + PVM => '', = RV => \do { my $v = undef },
I have resolved this by removing the PVM test as it causes trouble and doesn't really test much.


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.