Skip to content

Commit e9c44ba

Browse files
committed
Update Unicode Collation tests for Unicode 11.0
1 parent 94e7daa commit e9c44ba

6 files changed

+7255
-7263
lines changed

S32-str/CollationTestGen.p6

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ my Int:D $line-no = 0;
1111
my @lines;
1212
use Test;
1313
my @failed;
14-
my %todo = (25560, 25873, 25904, 47677, 47715, 47760, 47774, 47794, 47838,
15-
51526, 52483, 52545, 52565, 52605, 54537, 55881, 57453, 57481, 57525, 57545,
16-
57575, 57589, 57603, 57643, 57689, 59168, 59723, 59743, 59769, 60775, 60819,
17-
60839, 60871, 63806, 63868, 64506, 64528, 64858, 64920, 65426, 65457, 65515,
18-
66177, 66199, 66840, 66858, 66920, 67401, 67464, 73347, 73353, 73362, 73371,
19-
73670, 73695, 73740, 73808, 99002, 99025, 99048, 99052, 99063, 99067, 99092,
20-
99103, 99107, 120267, 120321, 120741, 120752, 156894, 156899, 156904, 156909).antipairs;
14+
my %todo = (25947, 26260, 26291, 49263, 49301, 49346, 49360, 49380, 49424,
15+
53192, 54149, 54211, 54231, 54271, 56203, 57547, 59119, 59147, 59191, 59211,
16+
59241, 59255, 59269, 59309, 59355, 60839, 61394, 61414, 61440, 62446, 62490,
17+
62510, 62542, 65487, 65549, 66187, 66209, 66539, 66601, 67107, 67138, 67196,
18+
67858, 67880, 68521, 68539, 68601, 69082, 69145, 75273, 75279, 75288, 75297,
19+
75596, 75621, 75666, 75734, 101490, 101513, 101536, 101540, 101551, 101555,
20+
101580, 101591, 101595, 123395, 123449, 123869, 123880).antipairs;
2121
sub MAIN (Bool :$should-test = False, Bool :$should-generate = True, Bool :$test-only = False, Str:D :$folder = $default-folder) {
2222
my $file = "$folder/CollationTest_NON_IGNORABLE.txt".IO;
2323
my $last-chrs;
@@ -28,8 +28,7 @@ sub MAIN (Bool :$should-test = False, Bool :$should-generate = True, Bool :$test
2828
my ($code-str, $uninames, $collation) = $line.split([';', "\t", "#"], :skip-empty);
2929
my $codes = $code-str.split(' ').map(*.parse-base(16)).list;
3030
next if $codes.first({is-surrogate($_)});
31-
$uninames .= trans( Q[\u] => 'U+', Q[\U] => 'U+');
32-
#say $line-no;
31+
$uninames .= trans( [Q[\u]] => ['U+'], [Q[\U]] => ['U+']);
3332
my $chrs = $codes.chrs;
3433
if $last-chrs && $last-chrs eq $chrs {
3534
next;
@@ -92,6 +91,7 @@ sub MAIN (Bool :$should-test = False, Bool :$should-generate = True, Bool :$test
9291
'my @a = ', "\n", @thing[$_].join("\n"), ";\n",
9392
"use Test;\n", "plan {@thing[$_].elems - 1};\n", $tail, "\n";
9493
}
94+
note "\n>>> Make sure to update docs/unicode-generated-tests.asciidoc when you update the unicode version of these tests";
9595
}
9696
sub quote-it (Str:D $str = "") {
9797
"Q««" ~ $str ~ "»»";

0 commit comments

Comments
 (0)