This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bison says 'parse error', not 'parser error'.
[perl5.git] / t / op / misc.t
index 667db98..6815f82 100755 (executable)
@@ -36,7 +36,9 @@ for (@prgs){
     $status = $?;
     $results = `$CAT $tmpfile`;
     $results =~ s/\n+$//;
-    $results =~ s/syntax error/syntax error/i;
+# bison says 'parse error' instead of 'syntax error',
+# various yaccs may or may not capitalize 'syntax'.
+    $results =~ s/^(syntax|parse) error/\L$1 error/mi;
     $expected =~ s/\n+$//;
     if ( $results ne $expected){
        print STDERR "PROG: $switch\n$prog\n";