This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/lib/croak/regcomp: Fix up for EBCDIC
authorKarl Williamson <khw@cpan.org>
Mon, 12 Mar 2018 17:18:11 +0000 (11:18 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 12 Mar 2018 17:21:33 +0000 (11:21 -0600)
This skips the current ASCII-centric test on EBCDIC platforms, and adds
an equivalent test for just those.

t/lib/croak/regcomp

index 57e3fac..c72e3d4 100644 (file)
@@ -48,9 +48,18 @@ EXPECT
 Invalid hexadecimal number in \N{U+...} in regex; marked by <-- HERE in m/\N{U+100_ <-- HERE }/ at - line 1.
 ########
 # NAME [\xDF\N{U+.}]
+# SKIP ? ord("A") != 65 && "Test valid only on ASCII machines"
 my $p00="[\\xDF\\N{U+.}]"; qr/$p00/ui;
 # The sharp s under /i recodes the parse, and this was causing a segfault when
 # the error message referred to the original pattern
 EXPECT
 Invalid hexadecimal number in \N{U+...} in regex; marked by <-- HERE in m/[\xDF\N{U+. <-- HERE }]/ at - line 1.
 ########
+# NAME [\x59\N{U+.}]
+# SKIP ? ord("A") == 65 && "Test valid only on EBCDIC machines"
+my $p00="[\\x59\\N{U+.}]"; qr/$p00/ui;
+# The sharp s under /i recodes the parse, and this was causing a segfault when
+# the error message referred to the original pattern
+EXPECT
+Invalid hexadecimal number in \N{U+...} in regex; marked by <-- HERE in m/[\x59\N{U+. <-- HERE }]/ at - line 1.
+########