Change 18169 by rgs@rgs-home on 2002/11/21 20:49:36 Add a test for bug #17920, and a new test file for it.
Affected files ... .... //depot/perl/MANIFEST#953 edit .... //depot/perl/t/comp/parser.t#1 add Differences ... ==== //depot/perl/MANIFEST#953 (text) ==== Index: perl/MANIFEST --- perl/MANIFEST#952~18160~ Tue Nov 19 04:07:25 2002 +++ perl/MANIFEST Thu Nov 21 12:49:36 2002 @@ -2365,6 +2365,7 @@ 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 ==== //depot/perl/t/comp/parser.t#1 (text) ==== Index: perl/t/comp/parser.t --- /dev/null Tue May 5 13:32:27 1998 +++ perl/t/comp/parser.t Thu Nov 21 12:49:36 2002 @@ -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"; End of Patch.