Skip to content

Commit db2fdbb

Browse files
committed
Harden test against \r\n -> 1 grapheme.
1 parent c7bfa55 commit db2fdbb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/qregex/01-qregex.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ my $tests := 0;
7676
for @files -> $fn {
7777
say("# file: $fn");
7878
my $contents := slurp('t/qregex/' ~ $fn);
79-
my @lines := nqp::split("\n", $contents);
79+
my @lines := nqp::index($contents, "\r\n") >= 0
80+
?? nqp::split("\r\n", $contents)
81+
!! nqp::split("\n", $contents);
8082

8183
for @lines -> $l {
8284
my $m := $l ~~ /'# todo ' .*? ':pge<' (.*?) '>'/;

0 commit comments

Comments
 (0)