This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix SEGV with eval("package Foo {")
[perl5.git] / t / comp / package_block.t
index 8645f1a..31aa3b8 100644 (file)
@@ -1,6 +1,6 @@
 #!./perl
 
-print "1..3\n";
+print "1..4\n";
 
 $main::result = "";
 eval q{
@@ -34,4 +34,7 @@ eval q{
 };
 print $main::result eq "a(main)b(main)" ? "ok 3\n" : "not ok 3\n";
 
+eval q[package Foo {];
+print $@ =~ /\AMissing right curly / ? "ok 4\n" : "not ok 4\n";
+
 1;