This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/test.pl: Actually change the code
authorKarl Williamson <khw@cpan.org>
Sun, 8 Mar 2015 15:15:44 +0000 (09:15 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 8 Mar 2015 17:06:40 +0000 (11:06 -0600)
Commit c42fde619a5536f7365e04b0ea569a21881b92ee claimed to do what this
commit actually does.  I forgot to merge the two commits before pushing.

t/test.pl

index de82e94..ef33e88 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -303,7 +303,12 @@ sub display {
                     $y = $y . $backslash_escape{$c};
                 } else {
                     my $z = chr $c; # Maybe we can get away with a literal...
-                    if ($z =~ /[[:^print:]]/a) {
+
+                    if ($z !~ /[^[:^print:][:^ascii:]]/) {
+                        # The pattern above is equivalent (by de Morgan's
+                        # laws) to:
+                        #     $z !~ /(?[ [:print:] & [:ascii:] ])/
+                        # or, $z is not an ascii printable character
 
                         # Use octal for characters with small ordinals that
                         # are traditionally expressed as octal: the controls