From: Andy Dougherty Date: Tue, 9 Jan 2001 12:11:16 +0000 (-0500) Subject: Re: [PATCH: perl@8342] comp/proto..........FAILED tests 112-123 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=24cc8ef6d2c387830d9f88fe302fe306816d5017;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH: perl@8342] comp/proto..........FAILED tests 112-123 Message-ID: More robust yacc/bison error detection. p4raw-id: //depot/perl@8381 --- diff --git a/t/comp/proto.t b/t/comp/proto.t index 874ab44..2242857 100755 --- a/t/comp/proto.t +++ b/t/comp/proto.t @@ -491,12 +491,14 @@ sub sreftest (\$$) { } # test prototypes when they are evaled and there is a syntax error +# Byacc generates the string "syntax error". Bison gives the +# string "parse error". # for my $p ( "", qw{ () ($) ($@) ($%) ($;$) (&) (&\@) (&@) (%) (\%) (\@) } ) { no warnings 'redefine'; my $eval = "sub evaled_subroutine $p { &void *; }"; eval $eval; - print "# eval[$eval]\nnot " unless $@ && $@ =~ /syntax error/; + print "# eval[$eval]\nnot " unless $@ && $@ =~ /(parse|syntax) error/i; print "ok ", $i++, "\n"; }