From: Rafael Garcia-Suarez Date: Thu, 21 Nov 2002 20:49:36 +0000 (+0000) Subject: Add a test for bug #17920, and a new test file for it. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=923be969f850682dfbedb80d41b470ed27a2362b;p=p5sagit%2Fp5-mst-13.2.git Add a test for bug #17920, and a new test file for it. p4raw-id: //depot/perl@18169 --- diff --git a/MANIFEST b/MANIFEST index aee5fa4..be029d0 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2365,6 +2365,7 @@ t/comp/hints.t See if %^H works t/comp/multiline.t See if multiline strings work t/comp/our.t Tests for our declaration t/comp/package.t See if packages work +t/comp/parser.t See if the parser works in edge cases t/comp/proto.t See if function prototypes work t/comp/redef.t See if we get correct warnings on redefined subs t/comp/require.t See if require works diff --git a/t/comp/parser.t b/t/comp/parser.t new file mode 100644 index 0000000..26f9c4e --- /dev/null +++ b/t/comp/parser.t @@ -0,0 +1,15 @@ +#!./perl + +# Checks if the parser behaves correctly in edge cases +# (including weird syntax errors) + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + +print "1..1\n"; + +# This used to dump core (bug #17920) +eval q{ sub { sub { f1(f2();); my($a,$b,$c) } } }; +print $@ && $@ =~ /error/ ? "ok 1\n" : "not ok 1\n";