Skip Menu |

This queue is for tickets about the Number-Format CPAN distribution.

Report information
The Basics
Id: 40859
Status: resolved
Priority: 0/
Queue: Number-Format

People
Owner: WRW [...] cpan.org
Requestors: cub.uanic [...] gmail.com
Cc:
AdminCc:

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



Subject: Tests failed with ru_RU.UTF-8 locale
Tests failed with RU locale: cub@humster Number-Format-1.60 % locale LANG=ru_RU.UTF-8 LC_CTYPE="ru_RU.UTF-8" LC_NUMERIC="ru_RU.UTF-8" LC_TIME="ru_RU.UTF-8" LC_COLLATE="ru_RU.UTF-8" LC_MONETARY="ru_RU.UTF-8" LC_MESSAGES="ru_RU.UTF-8" LC_PAPER="ru_RU.UTF-8" LC_NAME="ru_RU.UTF-8" LC_ADDRESS="ru_RU.UTF-8" LC_TELEPHONE="ru_RU.UTF-8" LC_MEASUREMENT="ru_RU.UTF-8" LC_IDENTIFICATION="ru_RU.UTF-8" LC_ALL= cub@humster Number-Format-1.60 % make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/format_bytes.......Number::Format: mon_thousands_sep is too long (max 1 character) at t/format_bytes.t line 9 # Looks like your test died just after 1. t/format_bytes.......dubious Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully t/format_negative....Number::Format: mon_thousands_sep is too long (max 1 character) at t/format_negative.t line 12 t/format_negative....ok 1/0# Looks like your test died just after 2. t/format_negative....dubious Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully t/format_number......ok 1/0Number::Format: mon_thousands_sep is too long (max 1 character) at t/format_number.t line 9 # Looks like your test died just after 1. t/format_number......dubious Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully t/format_picture.....ok 1/0Number::Format: mon_thousands_sep is too long (max 1 character) at t/format_picture.t line 12 # Looks like your test died just after 1. t/format_picture.....dubious Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully t/format_price.......ok 1/0Number::Format: mon_thousands_sep is too long (max 1 character) at t/format_price.t line 11 # Looks like your test died just after 1. t/format_price.......dubious Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully t/locale.............ok 2/4 skipped: various reasons t/object.............ok 1/0Number::Format: mon_thousands_sep is too long (max 1 character) at t/object.t line 14 # Looks like your test died just after 2. t/object.............dubious Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully t/round..............ok t/unformat_number....ok 1/0Number::Format: mon_thousands_sep is too long (max 1 character) at t/unformat_number.t line 9 # Looks like your test died just after 1. t/unformat_number....dubious Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/format_bytes.t 255 65280 1 0 ?? t/format_negative.t 255 65280 2 0 ?? t/format_number.t 255 65280 1 0 ?? t/format_picture.t 255 65280 1 0 ?? t/format_price.t 255 65280 1 0 ?? t/object.t 255 65280 2 0 ?? t/unformat_number.t 255 65280 1 0 ?? 2 subtests skipped. Failed 7/9 test scripts. 0/29 subtests failed. Files=9, Tests=29, 0 wallclock secs ( 0.51 cusr + 0.07 csys = 0.58 CPU) Failed 7/9 test programs. 0/29 subtests failed. make: *** [test_dynamic] Ошибка 255 cub@humster Number-Format-1.60 % Debugging give me this, hope will be helpful for you DB<12> $Data::Dumper::Useqq=1 DB<13> p Dumper($self); $VAR1 = bless( { "thousands_sep" => ",", "grouping" => undef, "p_sep_by_space" => 1, "neg_format" => "-x", "p_cs_precedes" => 1, "int_frac_digits" => 2, "mon_grouping" => "\3\3", "mega_suffix" => "M", "n_sign_posn" => 1, "decimal_digits" => 2, "decimal_fill" => 0, "currency_symbol" => "\321\200\321\203\320\261", "p_sign_posn" => 1, "int_curr_symbol" => "RUB ", "negative_sign" => "-", "frac_digits" => 2, "positive_sign" => "", "n_cs_precedes" => 1, "kilo_suffix" => "K", "decimal_point" => ".", "giga_suffix" => "G", "mon_thousands_sep" => "\302\240", "mon_decimal_point" => "." }, 'Number::Format' ); Seems like this problem can be experienced not only with RU locale, but with any UTF-based locale.
Subject: Re: [rt.cpan.org #40859] Tests failed with ru_RU.UTF-8 locale
Date: Wed, 12 Nov 2008 06:53:01 -0800
To: bug-Number-Format [...] rt.cpan.org
From: "Bill Ward" <bill [...] wards.net>
Your mon_thousands_sep is a Unicode character that is more than one byte long, which is probably the reason for this error. I'm not familiar with Russian language conventions for currency, but I never considered the idea that a multi-byte value would be used for this.... On Wed, Nov 12, 2008 at 4:58 AM, Kostyuk Oleg via RT < bug-Number-Format@rt.cpan.org> wrote: Show quoted text
> Wed Nov 12 07:58:44 2008: Request 40859 was acted upon. > Transaction: Ticket created by CUB > Queue: Number-Format > Subject: Tests failed with ru_RU.UTF-8 locale > Broken in: (no value) > Severity: Critical > Owner: Nobody > Requestors: cub.uanic@gmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=40859 > > > > Tests failed with RU locale: > > cub@humster Number-Format-1.60 % locale > LANG=ru_RU.UTF-8 > LC_CTYPE="ru_RU.UTF-8" > LC_NUMERIC="ru_RU.UTF-8" > LC_TIME="ru_RU.UTF-8" > LC_COLLATE="ru_RU.UTF-8" > LC_MONETARY="ru_RU.UTF-8" > LC_MESSAGES="ru_RU.UTF-8" > LC_PAPER="ru_RU.UTF-8" > LC_NAME="ru_RU.UTF-8" > LC_ADDRESS="ru_RU.UTF-8" > LC_TELEPHONE="ru_RU.UTF-8" > LC_MEASUREMENT="ru_RU.UTF-8" > LC_IDENTIFICATION="ru_RU.UTF-8" > LC_ALL= > cub@humster Number-Format-1.60 % make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/format_bytes.......Number::Format: mon_thousands_sep is too long (max > 1 character) > at t/format_bytes.t line 9 > # Looks like your test died just after 1. > t/format_bytes.......dubious > Test returned status 255 (wstat 65280, 0xff00) > after all the subtests completed successfully > t/format_negative....Number::Format: mon_thousands_sep is too long (max > 1 character) > at t/format_negative.t line 12 > t/format_negative....ok 1/0# Looks like your test died just after 2. > t/format_negative....dubious > Test returned status 255 (wstat 65280, 0xff00) > after all the subtests completed successfully > t/format_number......ok 1/0Number::Format: mon_thousands_sep is too long > (max 1 character) > at t/format_number.t line 9 > # Looks like your test died just after 1. > t/format_number......dubious > Test returned status 255 (wstat 65280, 0xff00) > after all the subtests completed successfully > t/format_picture.....ok 1/0Number::Format: mon_thousands_sep is too long > (max 1 character) > at t/format_picture.t line 12 > # Looks like your test died just after 1. > t/format_picture.....dubious > Test returned status 255 (wstat 65280, 0xff00) > after all the subtests completed successfully > t/format_price.......ok 1/0Number::Format: mon_thousands_sep is too long > (max 1 character) > at t/format_price.t line 11 > # Looks like your test died just after 1. > t/format_price.......dubious > Test returned status 255 (wstat 65280, 0xff00) > after all the subtests completed successfully > t/locale.............ok > 2/4 skipped: various reasons > t/object.............ok 1/0Number::Format: mon_thousands_sep is too long > (max 1 character) > at t/object.t line 14 > # Looks like your test died just after 2. > t/object.............dubious > Test returned status 255 (wstat 65280, 0xff00) > after all the subtests completed successfully > t/round..............ok > t/unformat_number....ok 1/0Number::Format: mon_thousands_sep is too long > (max 1 character) > at t/unformat_number.t line 9 > # Looks like your test died just after 1. > t/unformat_number....dubious > Test returned status 255 (wstat 65280, 0xff00) > after all the subtests completed successfully > Failed Test Stat Wstat Total Fail List of Failed > > ------------------------------------------------------------------------------- > t/format_bytes.t 255 65280 1 0 ?? > t/format_negative.t 255 65280 2 0 ?? > t/format_number.t 255 65280 1 0 ?? > t/format_picture.t 255 65280 1 0 ?? > t/format_price.t 255 65280 1 0 ?? > t/object.t 255 65280 2 0 ?? > t/unformat_number.t 255 65280 1 0 ?? > 2 subtests skipped. > Failed 7/9 test scripts. 0/29 subtests failed. > Files=9, Tests=29, 0 wallclock secs ( 0.51 cusr + 0.07 csys = 0.58 CPU) > Failed 7/9 test programs. 0/29 subtests failed. > make: *** [test_dynamic] Ошибка 255 > cub@humster Number-Format-1.60 % > > > Debugging give me this, hope will be helpful for you > > DB<12> $Data::Dumper::Useqq=1 > DB<13> p Dumper($self); > $VAR1 = bless( { > "thousands_sep" => ",", > "grouping" => undef, > "p_sep_by_space" => 1, > "neg_format" => "-x", > "p_cs_precedes" => 1, > "int_frac_digits" => 2, > "mon_grouping" => "\3\3", > "mega_suffix" => "M", > "n_sign_posn" => 1, > "decimal_digits" => 2, > "decimal_fill" => 0, > "currency_symbol" => "\321\200\321\203\320\261", > "p_sign_posn" => 1, > "int_curr_symbol" => "RUB ", > "negative_sign" => "-", > "frac_digits" => 2, > "positive_sign" => "", > "n_cs_precedes" => 1, > "kilo_suffix" => "K", > "decimal_point" => ".", > "giga_suffix" => "G", > "mon_thousands_sep" => "\302\240", > "mon_decimal_point" => "." > }, 'Number::Format' ); > > Seems like this problem can be experienced not only with RU locale, but > with any UTF-based locale. >
Russian locale is really different... the thousands_sep / mon_thousands_sep is a multibyte character, and the decimal_point and mon_decimal_point are not the same!
Allowing either decimal point to be used as the delimiter, so long as the thousands_sep values are different from the decimal point values. Fix will be in version 1.72
Fixed in release 1.72