-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this issue was discovered using preliminary CLDR v28 data
- Loading branch information
Showing
5 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,5 @@ t/objects.t | |
t/pattern-coerce.t | ||
t/pattern-trigger.t | ||
t/quoting.t | ||
t/range.t | ||
t/rounding.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use utf8; | ||
use strict; | ||
use warnings; | ||
use open qw( :encoding(UTF-8) :std ); | ||
use Test::More tests => 6; | ||
use CLDR::Number; | ||
|
||
my ($cldr, $decf, $perf, $curf); | ||
|
||
$cldr = CLDR::Number->new(locale => 'en'); | ||
$decf = $cldr->decimal_formatter; | ||
$perf = $cldr->percent_formatter; | ||
$curf = $cldr->currency_formatter(currency_code => 'EUR'); | ||
|
||
is $decf->range(1, 5), '1–5', 'range of numbers (en)'; | ||
is $perf->range(0.01, 0.05), '1%–5%', 'range of percents (en)'; | ||
is $curf->range(1, 5), '€1.00–€5.00', 'range of prices (en)'; | ||
|
||
$cldr = CLDR::Number->new(locale => 'es-CO'); | ||
$decf = $cldr->decimal_formatter; | ||
$perf = $cldr->percent_formatter; | ||
$curf = $cldr->currency_formatter(currency_code => 'COP'); | ||
|
||
is $decf->range(1, 5), 'de 1 a 5', 'range of numbers (es-CO)'; | ||
is $perf->range(0.01, 0.05), 'de 1% a 5%', 'range of percents (es-CO)'; | ||
is $curf->range(1, 5), 'de $ 1,00 a $ 5,00', 'range of prices (es-CO)'; |