diff options
Diffstat (limited to 't/comp/parser.t')
-rw-r--r-- | t/comp/parser.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t new file mode 100644 index 0000000000..26f9c4e56c --- /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"; |