Skip to content

Commit

Permalink
Add tests for case changes when we have Prepend codepoints
Browse files Browse the repository at this point in the history
  • Loading branch information
samcv committed Sep 12, 2017
1 parent aa2ea1a commit 00554cc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S15-nfg/case-change.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 52;
plan 72;

# LATIN CAPITAL LETTER D, COMBINING DOT BELOW, COMBINING DOT ABOVE
{
Expand Down Expand Up @@ -97,3 +97,14 @@ plan 52;
isnt $x.fc, $x, 'fc gives identity';
is $x.fc.NFD.list, (0x0066, 0x0323, 0x0066), 'fc gives correct NFD';
}

{
my $Prepend = "\c[ARABIC NUMBER SIGN]";
my $Extend = "\c[COMBINING CARON]";
for ^10 {
my $lower = "{$Prepend x $_}á{$Extend x (9 - $_)}";
my $upper = "{$Prepend x $_}Á{$Extend x (9 - $_)}";
is-deeply $lower.uc, $upper, "Prepend + á + Extend casechange is correct: .uc: (Prepend x $_ ~ 'á' ~ Extend x {9 - $_}).uc";
is-deeply $upper.lc, $lower, "Prepend + Á + Extend casechange is correct: .lc: (Prepend x $_ ~ 'á' ~ Extend x {9 - $_}).lc";
}
}

0 comments on commit 00554cc

Please sign in to comment.