Fix list-context //g with zero-length matches
[p5sagit/p5-mst-13.2.git] / t / pragma / warning.t
index 598079e..640dc2f 100755 (executable)
@@ -52,7 +52,7 @@ for (@prgs){
     my @temps = () ;
     if (s/^\s*-\w+//){
         $switch = $&;
-        $switch =~ s/(-\S*[A-Z]\S*)/"-$1"/ if $Is_VMS; # protect uc switches
+        $switch =~ s/(-\S*[A-Z]\S*)/"$1"/ if $Is_VMS; # protect uc switches
     }
     my($prog,$expected) = split(/\nEXPECT\n/, $_);
     if ( $prog =~ /--FILE--/) {
@@ -85,9 +85,9 @@ for (@prgs){
     # allow expected output to be written as if $prog is on STDIN
     $results =~ s/tmp\d+/-/g;
     $results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS;  # clip off DCL status msg
-# bison says 'parser error' instead of 'syntax error',
+# bison says 'parse error' instead of 'syntax error',
 # various yaccs may or may not capitalize 'syntax'.
-    $results =~ s/^(syntax|parser) error/\L$1 error/mi;
+    $results =~ s/^(syntax|parse) error/syntax error/mig;
     $expected =~ s/\n+$//;
     my $prefix = ($results =~ s/^PREFIX\n//) ;
     # any special options? (OPTIONS foo bar zap)