summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRobin Houston <robin@cpan.org>2001-03-14 04:16:10 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-14 04:59:54 +0000
commita4f3a277dab3a9e285418160103305f0e5819cf9 (patch)
treed56fdc8f4967c6c6df5c1cf1f6d8970dab68ed78 /t
parentdae2d13f8edc3ee84694ec70a87a495ba78e08f2 (diff)
downloadperl-a4f3a277dab3a9e285418160103305f0e5819cf9.tar.gz
PATCH: make goto work in nested eval ""
Message-ID: <20010314041610.A16307@puffinry.freeserve.co.uk> p4raw-id: //depot/perl@9147
Diffstat (limited to 't')
-rwxr-xr-xt/op/goto.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/op/goto.t b/t/op/goto.t
index 6f9e3493d5..b2e5b2ca98 100755
--- a/t/op/goto.t
+++ b/t/op/goto.t
@@ -2,7 +2,7 @@
# "This IS structured code. It's just randomly structured."
-print "1..21\n";
+print "1..22\n";
while ($?) {
$foo = 1;
@@ -129,6 +129,21 @@ eval q{
print ($ok&&!$@ ? "ok 21\n" : "not ok 21\n");
+# Test that goto works in nested eval-string
+$ok = 0;
+{eval q{
+ eval q{
+ goto LABEL22;
+ };
+ $ok = 0;
+ last;
+
+ LABEL22: $ok = 1;
+};
+$ok = 0 if $@;
+}
+print ($ok ? "ok 22\n" : "not ok 22\n");
+
exit;
bypass: