|Subject:||t/aggregate.t may fail under some circumstances (locale, freebsd, recent perl)|
t/aggregate.t fails under the following circumstances: * a newer perl (5.22.0 or newer, it can be produced on some late 5.21.x versions) * a locale where the decimal separator is comma and not dot (e.g German and probably most European non-English locales). * freebsd Log of the failing test: # Failed test 'exact number not there' # at t-aggregate/deflators/formatnumber.t line 24. # '<form action="" method="post"> # <div> # <input name="foo" type="text" value="10002300,12300000" /> # </div> # </form> # ' # matches '(?^:10002300.123)' # Looks like you failed 1 test of 1. # Failed test 'Tests for t-aggregate/deflators/formatnumber.t' # at /usr/perl5.23.4p/lib/site_perl/5.23.4/Test/Aggregate/Nested.pm line 229. # Looks like you failed 1 test of 402. t/aggregate.t .................. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/402 subtests What happens here? Maybe the bug is somewhere in Number::Format. Normally, there are some thousand separators in the formatted number. But not on freebsd with a new perl and a German locale: $ env LC_ALL=de_DE.UTF-8 perl5.23.4 -MNumber::Format -e 'warn Number::Format->new->format_number(10002300.123)' 10002300,12 at -e line 1. With a C locale it looks like expected: $ env LC_ALL=C perl5.23.4 -MNumber::Format -e 'warn Number::Format->new->format_number(10002300.123)' 10,002,300.12 at -e line 1. With an older perl it seems that the locale is ignored, and it's formatted like an English number: $ env LC_ALL=de_DE.UTF-8 perl5.20.0 -MNumber::Format -e 'warn Number::Format->new->format_number(10002300.123)' 10,002,300.12 at -e line 1. Everywhere Number::Format 1.75 was installed.