summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-03-14 11:48:11 -0600
committerKarl Williamson <khw@cpan.org>2019-03-14 12:18:01 -0600
commitf4e61fc03836484ea88518e8bf04cc1b32a6a1a0 (patch)
tree54a697a00fe9ed00a15d86abb46a359b95f7407e /t
parentbfa9f5ee70ce509f0e66dcff9e9fda131ea8a133 (diff)
downloadperl-f4e61fc03836484ea88518e8bf04cc1b32a6a1a0.tar.gz
Any Common digit set can match in any script
This fixes a design flaw in script runs that in 5.30 effectively prevented digits from the Common script except the ASCII [0-9] from being in any meaningful script run.
Diffstat (limited to 't')
-rw-r--r--t/re/script_run.t19
1 files changed, 17 insertions, 2 deletions
diff --git a/t/re/script_run.t b/t/re/script_run.t
index 035a9104aa..19d4e10e53 100644
--- a/t/re/script_run.t
+++ b/t/re/script_run.t
@@ -51,8 +51,8 @@ foreach my $type ('script_run', 'sr', 'atomic_script_run', 'asr') {
unlike("\N{HEBREW LETTER ALEF}\N{HEBREW LETTER TAV}\N{MODIFIER LETTER SMALL Y}", $script_run, "Hebrew then Latin isn't a script run");
like("9876543210\N{DESERET SMALL LETTER WU}", $script_run, "0-9 are the digits for Deseret");
like("\N{DESERET SMALL LETTER WU}9876543210", $script_run, "Also when they aren't in the initial position");
- unlike("\N{DESERET SMALL LETTER WU}\N{FULLWIDTH DIGIT FIVE}", $script_run, "Fullwidth digits aren't the digits for Deseret");
- unlike("\N{FULLWIDTH DIGIT SIX}\N{DESERET SMALL LETTER LONG I}", $script_run, "... likewise if the digits come first");
+ like("\N{DESERET SMALL LETTER WU}\N{FULLWIDTH DIGIT FIVE}", $script_run, "Fullwidth digits may be digits for Deseret");
+ like("\N{FULLWIDTH DIGIT SIX}\N{DESERET SMALL LETTER LONG I}", $script_run, "... likewise if the digits come first");
like("1234567890\N{ARABIC LETTER ALEF}", $script_run, "[0-9] work for Arabic");
unlike("1234567890\N{ARABIC LETTER ALEF}\N{ARABIC-INDIC DIGIT FOUR}\N{ARABIC-INDIC DIGIT FIVE}", $script_run, "... but not in combination with real ARABIC digits");
@@ -104,4 +104,19 @@ foreach my $type ('script_run', 'sr', 'atomic_script_run', 'asr') {
like("\x{3041}12\x{3041}", qr/^(*sr:.{4})/,
"Script without own zero works with ASCII digits");
+ like("A\x{ff10}\x{ff19}B", qr/^(*sr:.{4})/,
+ "Non-ASCII Common digits work with Latin"); # perl #133547
+ like("A\x{ff10}BC", qr/^(*sr:.{4})/,
+ "Non-ASCII Common digits work with Latin"); # perl #133547
+ like("A\x{1d7ce}\x{1d7cf}B", qr/^(*sr:.{4})/,
+ "Non-ASCII Common digits work with Latin"); # perl #133547
+ like("A\x{1d7ce}BC", qr/^(*sr:.{4})/,
+ "Non-ASCII Common digits work with Latin"); # perl #133547
+ like("\x{1d7ce}\x{1d7cf}AB", qr/^(*sr:.{4})/,
+ "Non-ASCII Common digits work with Latin"); # perl #133547
+ like("α\x{1d7ce}βγ", qr/^(*sr:.{4})/,
+ "Non-ASCII Common digits work with Greek"); # perl #133547
+ like("\x{1d7ce}αβγ", qr/^(*sr:.{4})/,
+ "Non-ASCII Common digits work with Greek"); # perl #133547
+
done_testing();