summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2002-11-21 20:49:36 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2002-11-21 20:49:36 +0000
commit923be969f850682dfbedb80d41b470ed27a2362b (patch)
treebc739ba988a6bd289431b7cc98b7f447a13733aa /t/comp
parent53df3d8cb98cbfbef669eddaaa174212d27bd68c (diff)
downloadperl-923be969f850682dfbedb80d41b470ed27a2362b.tar.gz
Add a test for bug #17920, and a new test file for it.
p4raw-id: //depot/perl@18169
Diffstat (limited to 't/comp')
-rw-r--r--t/comp/parser.t15
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";