More robust yacc/bison failure output handling.
[p5sagit/p5-mst-13.2.git] / t / pragma / subs.t
index 680564f..58b53ae 100755 (executable)
@@ -55,7 +55,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
-    $results =~ s/Syntax/syntax/;  # non-standard yacc
+# bison says 'parser error' instead of 'syntax error',
+# various yaccs may or may not capitalize 'syntax'.
+    $results =~ s/^(syntax|parser) error/\L$1 error/i;
     $expected =~ s/\n+$//;
     my $prefix = ($results =~ s/^PREFIX\n//) ;
     if ( $results =~ s/^SKIPPED\n//) {