From 24cc8ef6d2c387830d9f88fe302fe306816d5017 Mon Sep 17 00:00:00 2001 From: Andy Dougherty Date: Tue, 9 Jan 2001 07:11:16 -0500 Subject: [PATCH] Re: [PATCH: perl@8342] comp/proto..........FAILED tests 112-123 Message-ID: More robust yacc/bison error detection. p4raw-id: //depot/perl@8381 --- t/comp/proto.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"; } -- 2.7.4