summaryrefslogtreecommitdiff
path: root/cpan/Unicode-Collate/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-03-20 07:07:21 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2015-03-20 07:13:17 -0400
commit126be117f430e22872b7c083797271ef6f2e51a0 (patch)
tree502795c499c7e8f69e50fd38611d627495b763b5 /cpan/Unicode-Collate/t
parentce1e892ee997ffdf17c58c5e7f0be91098aa2be3 (diff)
downloadperl-126be117f430e22872b7c083797271ef6f2e51a0.tar.gz
Update Unicode-Collate to CPAN version 1.12
[DELTA] 1.12 Mon Mar 16 20:21:15 2015 - XS: [rt.cpan.org #102663] IRIX 6.5 failures with Unicode::Collate (porting: avoid non-zero values in the initializer of an array)
Diffstat (limited to 'cpan/Unicode-Collate/t')
-rw-r--r--cpan/Unicode-Collate/t/ident.t19
-rw-r--r--cpan/Unicode-Collate/t/loc_es.t2
-rw-r--r--cpan/Unicode-Collate/t/loc_estr.t2
-rw-r--r--cpan/Unicode-Collate/t/loc_fr.t2
-rw-r--r--cpan/Unicode-Collate/t/view.t41
5 files changed, 50 insertions, 16 deletions
diff --git a/cpan/Unicode-Collate/t/ident.t b/cpan/Unicode-Collate/t/ident.t
index 0b5ddb397d..874d845e83 100644
--- a/cpan/Unicode-Collate/t/ident.t
+++ b/cpan/Unicode-Collate/t/ident.t
@@ -16,7 +16,7 @@ BEGIN {
use strict;
use warnings;
-BEGIN { $| = 1; print "1..45\n"; }
+BEGIN { $| = 1; print "1..48\n"; }
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
@@ -107,9 +107,14 @@ ok($Collator->viewSortKey('a'),
ok($Collator->viewSortKey("\x{304C}"),
'[1926 | 0020 013D | 000E 0002 | FFFF FFFF | 0000 304C]');
+ok($Collator->viewSortKey("\x{4E00}"),
+ '[FB40 CE00 | 0020 | 0002 | FFFF FFFF | 0000 4E00]');
+
ok($Collator->viewSortKey("\x{100000}"),
'[FBE0 8000 | 0020 | 0002 | FFFF FFFF | 0010 0000]');
+##### 38
+
eval { require Unicode::Normalize };
if (!$@) {
$Collator->change(normalization => "NFD");
@@ -122,7 +127,7 @@ if (!$@) {
$Collator->change(normalization => undef);
-##### 38
+##### 39
$Collator->change(level => 3);
@@ -139,7 +144,7 @@ $Collator->change(level => 1);
ok($Collator->viewSortKey("\x{304C}"),
'[1926 | | | | 0000 304C]');
-##### 41
+##### 42
$Collator->change(UCA_Version => 8);
@@ -161,4 +166,10 @@ $Collator->change(level => 4);
ok($Collator->viewSortKey("\x{304C}"),
'[1926|0020 013D|000E 0002|FFFF FFFF|0000 304C]');
-##### 45
+ok($Collator->viewSortKey("\x{4E00}"),
+ '[4E00|0020|0002|FFFF|0000 4E00]');
+
+ok($Collator->viewSortKey("\x{100000}"),
+ '[FFA0 8000|0002|0001|FFFF FFFF|0010 0000]');
+
+##### 48
diff --git a/cpan/Unicode-Collate/t/loc_es.t b/cpan/Unicode-Collate/t/loc_es.t
index e3a081d07d..72d5fce67c 100644
--- a/cpan/Unicode-Collate/t/loc_es.t
+++ b/cpan/Unicode-Collate/t/loc_es.t
@@ -37,7 +37,7 @@ my $objEs = Unicode::Collate::Locale->
new(locale => 'ES', normalization => undef);
ok($objEs->getlocale, 'es');
-ok($objEs->locale_version, 1.11);
+ok($objEs->locale_version, 1.12);
$objEs->change(level => 1);
diff --git a/cpan/Unicode-Collate/t/loc_estr.t b/cpan/Unicode-Collate/t/loc_estr.t
index d8a2b0e58a..e4d3588247 100644
--- a/cpan/Unicode-Collate/t/loc_estr.t
+++ b/cpan/Unicode-Collate/t/loc_estr.t
@@ -37,7 +37,7 @@ my $objEsTrad = Unicode::Collate::Locale->
new(locale => 'ES-trad', normalization => undef);
ok($objEsTrad->getlocale, 'es__traditional');
-ok($objEsTrad->locale_version, 1.11);
+ok($objEsTrad->locale_version, 1.12);
$objEsTrad->change(level => 1);
diff --git a/cpan/Unicode-Collate/t/loc_fr.t b/cpan/Unicode-Collate/t/loc_fr.t
index fa8cdf41e1..779a1bf8d2 100644
--- a/cpan/Unicode-Collate/t/loc_fr.t
+++ b/cpan/Unicode-Collate/t/loc_fr.t
@@ -40,7 +40,7 @@ my $objFr = Unicode::Collate::Locale->
new(locale => 'FR', normalization => undef);
ok($objFr->getlocale, 'fr');
-ok($objFr->locale_version, 1.11);
+ok($objFr->locale_version, 1.12);
$objFr->change(level => 1);
diff --git a/cpan/Unicode-Collate/t/view.t b/cpan/Unicode-Collate/t/view.t
index 381d4c5456..91da5968bd 100644
--- a/cpan/Unicode-Collate/t/view.t
+++ b/cpan/Unicode-Collate/t/view.t
@@ -16,7 +16,7 @@ BEGIN {
use strict;
use warnings;
-BEGIN { $| = 1; print "1..93\n"; } # 53 + 4 x @Versions
+BEGIN { $| = 1; print "1..106\n"; } # 62 + 4 x @Versions
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
@@ -39,9 +39,12 @@ my $Collator = Unicode::Collate->new(
UCA_Version => 24,
);
-ok($Collator->viewSortKey(""), "[| | |]");
+ok($Collator->viewSortKey(""), '[| | |]');
+ok($Collator->viewSortKey("\0"), '[| | |]');
+ok($Collator->viewSortKey("\x{200B}"), '[| | |]');
-ok($Collator->viewSortKey("A"), "[0A15 | 0020 | 0008 | FFFF]");
+ok($Collator->viewSortKey("A"), '[0A15 | 0020 | 0008 | FFFF]');
+ok($Collator->viewSortKey('a'), '[0A15 | 0020 | 0002 | FFFF]');
ok($Collator->viewSortKey("ABC"),
"[0A15 0A29 0A3D | 0020 0020 0020 | 0008 0008 0008 | FFFF FFFF FFFF]");
@@ -53,6 +56,15 @@ ok($Collator->viewSortKey("!\x{300}"), "[| | | 024B]");
ok($Collator->viewSortKey("\x{300}"), "[| 0035 | 0002 | FFFF]");
+ok($Collator->viewSortKey("\x{304C}"),
+ '[1926 | 0020 013D | 000E 0002 | FFFF FFFF]');
+
+ok($Collator->viewSortKey("\x{4E00}"),
+ '[FB40 CE00 | 0020 | 0002 | FFFF FFFF]');
+
+ok($Collator->viewSortKey("\x{100000}"),
+ '[FBE0 8000 | 0020 | 0002 | FFFF FFFF]');
+
$Collator->change(level => 3);
ok($Collator->viewSortKey("A"), "[0A15 | 0020 | 0008 |]");
@@ -62,7 +74,7 @@ ok($Collator->viewSortKey("A"), "[0A15 | 0020 | |]");
$Collator->change(level => 1);
ok($Collator->viewSortKey("A"), "[0A15 | | |]");
-##### 10
+##### 16
$Collator->change(level => 4, UCA_Version => 8);
@@ -80,6 +92,15 @@ ok($Collator->viewSortKey("!\x{300}"), "[|0035|0002|024B FFFF]");
ok($Collator->viewSortKey("\x{300}"), "[|0035|0002|FFFF]");
+ok($Collator->viewSortKey("\x{304C}"),
+ '[1926|0020 013D|000E 0002|FFFF FFFF]');
+
+ok($Collator->viewSortKey("\x{4E00}"),
+ '[4E00|0020|0002|FFFF]');
+
+ok($Collator->viewSortKey("\x{100000}"),
+ '[FFA0 8000|0002|0001|FFFF FFFF]');
+
$Collator->change(level => 3);
ok($Collator->viewSortKey("A"), "[0A15|0020|0008|]");
@@ -89,7 +110,7 @@ ok($Collator->viewSortKey("A"), "[0A15|0020||]");
$Collator->change(level => 1);
ok($Collator->viewSortKey("A"), "[0A15|||]");
-##### 19
+##### 28
$Collator->change(level => 3, UCA_Version => 9);
ok($Collator->viewSortKey("A\x{300}z\x{301}"),
@@ -115,6 +136,8 @@ $Collator->change(backwards => []);
ok($Collator->viewSortKey("A\x{300}z\x{301}"),
"[0A15 0C13 | 0020 0035 0020 0032 | 0008 0002 0002 0002 |]");
+##### 34
+
$Collator->change(level => 4);
# Variable
@@ -158,7 +181,7 @@ ok($Collator->viewSortKey("?!."), '[| | | 024E 024B 0255]');
$Collator->change(%origVar);
-##### 37
+##### 46
# Level 3 weight
@@ -199,7 +222,7 @@ ok($Collator->viewSortKey("a\x{3042}"),
ok($Collator->viewSortKey("A\x{30A2}"),
'[0A15 1921 | 0020 0020 | 0008 0011 | FFFF FFFF]');
-##### 47
+##### 56
our $el = Unicode::Collate->new(
entry => <<'ENTRY',
@@ -243,9 +266,9 @@ ok($el->viewSortKey("l\x{FF4C}\x{217C}\x{2113}\x{24DB}"),
ok($el->viewSortKey("L\x{FF2C}\x{216C}\x{2112}\x{24C1}"),
"[$el12 | 0008 0009 000A 000B 000C | FFFF FFFF FFFF FFFF FFFF]");
-##### 53
+##### 62
-my @Versions = (9, 11, 14, 16, 18, 20, 22, 24, 26, 28);
+my @Versions = (9, 11, 14, 16, 18, 20, 22, 24, 26, 28, 30);
for my $v (@Versions) {
$Collator->change(UCA_Version => $v);