Skip to content

Commit 1524fa2

Browse files
committed
Add tests for case insensitive regex for synthetic graphemes
These tests were prompted by this commit: MoarVM/MoarVM@498a21d AlexDaniel++ for finding this bug
1 parent 7b14317 commit 1524fa2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

S05-modifier/ignorecase.t

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 36;
4+
plan 38;
55

66
=begin description
77
@@ -80,15 +80,19 @@ ok 'A4' ~~ /:i a[3|4|5] | b[3|4] /, 'alternation sanity';
8080
nok "m" ~~ /<[M]>/, "ignore case of character classes";
8181
nok "n" ~~ /:i <[M]>/, "ignore case of character classes";
8282
}
83+
8384
# RT #126793
8485
{
8586
#?rakudo.jvm 1 todo "ligatures don't casefold on JVM"
8687
ok '' ~~ /:i st/, ":i haystack 'st' needle 'st'";
87-
#?rakudo 10 todo "ligatures in the haystack of case insensensitive regex don't work"
88+
#?rakudo 1 todo "ligatures in the haystack of case insensensitive regex don't work"
8889
for 1..10 {
8990
my $haystack = ('a'..'z').pick($_).join ~ '';
9091
ok $haystack ~~ /:i st/, ":i haystack: '$haystack' needle: 'st'";
9192
}
9293
}
9394

95+
nok (88.chr ~ 875.chr ~ 8413.chr) ~~ /:i x /, 'case insensitive regex works for haystacks which have synthetic graphemes';
96+
ok (88.chr ~ 875.chr ~ 8413.chr ~ 'x') ~~ /:i x /, 'case insensitive regex works for haystacks which have synthetic graphemes';
97+
9498
# vim: syn=perl6 sw=4 ts=4 expandtab

0 commit comments

Comments
 (0)