Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4c0fa6
commit 87d1e68
Showing
1 changed file
with
31 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# for background, see http://irclog.perlgeek.de/perl6/2015-06-08#i_10716770 through 16:44 UTC | ||
|
||
use Test; | ||
|
||
plan 8; | ||
|
||
my $control-str = 'o'; | ||
|
||
is $control-str.chars, 1, "Correct value of .chars for '$control-str' (no combining characters)"; | ||
|
||
my @non-cgj-combiners = ( | ||
"o\c[COMBINING DOT ABOVE]", | ||
"o\c[COMBINING DOT BELOW]", | ||
"o\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]", | ||
); | ||
|
||
for @non-cgj-combiners -> $test-str { | ||
is $test-str.chars, 1, "Correct value of .chars for '$test-str' (combining characters, but not CGJ)"; | ||
} | ||
|
||
my @cgj-first-combiner = ( | ||
"o\c[COMBINING GRAPHEME JOINER]", | ||
"o\c[COMBINING DOT ABOVE]\c[COMBINING GRAPHEME JOINER]", | ||
"o\c[COMBINING GRAPHEME JOINER]\c[COMBINING DOT BELOW]", | ||
"o\c[COMBINING DOT ABOVE]\c[COMBINING GRAPHEME JOINER]\c[COMBINING DOT BELOW]", | ||
); | ||
|
||
for @cgj-first-combiner -> $test-str { | ||
#?rakudo todo 'CGJ special case of combining character with ccc=0' | ||
is $test-str.chars, 1, "Correct value of .chars for '$test-str' (combining characters, including CGJ)"; | ||
} |