This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/re/pat_advanced.t: Fix test to work on EBCDIC
authorKarl Williamson <khw@cpan.org>
Tue, 11 Jul 2017 02:11:09 +0000 (20:11 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 11 Jul 2017 02:20:09 +0000 (20:20 -0600)
t/re/pat_advanced.t

index a2ff681..3d57bea 100644 (file)
@@ -945,7 +945,9 @@ sub run_tests {
                     'Empty string charname produces NOTHING node';
         like "\N{LONG-STR}", qr/^\N{LONG-STR}$/, 'Verify that long string works';
         like "\N{LONG-STR}", qr/^\N{LONG-STR}$/i, 'Verify under folding that long string works';
-        like "\xc4", qr/\N{EMPTY-STR}\xe4/i, 'Empty \N{} should change /d to /u';
+
+        # perlhacktips points out that these work on both ASCII and EBCDIC
+        like "\xfc", qr/\N{EMPTY-STR}\xdc/i, 'Empty \N{} should change /d to /u';
 
         eval '/(?[[\N{EMPTY-STR}]])/';
         like $@, qr/Zero length \\N\{\}/, 'Verify zero-length return from \N{} correctly fails';