Skip Menu |

This queue is for tickets about the lc_time CPAN distribution.

Report information
The Basics
Id: 103977
Status: resolved
Priority: 0/
Queue: lc_time

People
Owner: abeltje [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Tests fail with perl 5.21.x on some systems
t/10-basic.t may fail with perl 5.21.x like this: # Failed test 'Portuguese: Mar�o Mar' # at t/10-basic.t line 82. Wide character in print at /opt/perl-5.21.3/lib/site_perl/5.21.3/Test/Builder.pm line 1824. # 'Mar�o Mar' # doesn't match '(?^u:^Março Mar\.?$)' # Looks like you failed 1 test of 8. t/10-basic.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/8 subtests (less 4 skipped subtests: 3 okay) "May" -> I see this only on my linux smokers, but not on the freebsd smokers. Maybe it has to do something with the installed locales on this system.
On 2015-04-26 09:01:35, SREZIC wrote: Show quoted text
> t/10-basic.t may fail with perl 5.21.x like this: > > # Failed test 'Portuguese: Mar�o Mar' > # at t/10-basic.t line 82. > Wide character in print at /opt/perl- > 5.21.3/lib/site_perl/5.21.3/Test/Builder.pm line 1824. > # 'Mar�o Mar' > # doesn't match '(?^u:^Março Mar\.?$)' > # Looks like you failed 1 test of 8. > t/10-basic.t .. > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/8 subtests > (less 4 skipped subtests: 3 okay) > > "May" -> I see this only on my linux smokers, but not on the freebsd > smokers. Maybe it has to do something with the installed locales on > this system.
Yes. The freebsd systems also have iso8859-x locales available, next to utf-8 locales. When running "locale -a", then iso8859-x locales are listed before the utf-8 locales, and used in 10-basic.t. If 10-basic.t is changed to skip iso8859-x locales, e.g. using chomp(@locale_avail = grep { !/iso8859/i } qx/locale -a/) if $^O ne 'MSWin32'; then the test suite fails also on freebsd systems.
Found the culprit: Porting/bisect.pl --start v5.20.2 -- ./perl -Ilib -I/Users/abetim/ztreet/github/lc_time/lib /Users/abetim/ztreet/github/lc_time/t/10-basic.t Bail out! Cannot decode string with wide characters at lib/Encode.pm line 175. HEAD is now at 9717af6 strftime: Set UTF-8 flag appropriately on return bad - non-zero exit from ./perl -Ilib -I/Users/abetim/ztreet/github/lc_time/lib /Users/abetim/ztreet/github/lc_time/t/10-basic.t 9717af6d049902fc887c412facb2d15e785ef1a4 is the first bad commit commit 9717af6d049902fc887c412facb2d15e785ef1a4 Author: Karl Williamson <khw@cpan.org> Date: Fri Jun 6 13:08:17 2014 -0600 strftime: Set UTF-8 flag appropriately on return The flag was only getting set if the format was in UTF-8. This looks at the return values, and sets the flag if they are non-ASCII UTF-8 and, as a further check, if the current locale is a UTF-8 one. :040000 040000 912e68d8f48d2cb5e0a8d91a08e84f64e7e7cdbc e13c4592f1f58112ec3720ec45fd1a1347e2948d M ext :040000 040000 9aad1878b64d573f6cd4b9949c3cc127d1171647 11baf3f8d218026f4aad767718db46fe27c219bf M lib bisect run success That took 2395 seconds Now I need to find a solution :) -- Abe.
No decoding attempt is made for perl >= 5.21.1 with UTF-8 locale. Version 0.12 is on its way to CPAN. Good luck, -- Abe.