diff options
author | Robin Houston <robin@cpan.org> | 2001-03-14 04:16:10 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-14 04:59:54 +0000 |
commit | a4f3a277dab3a9e285418160103305f0e5819cf9 (patch) | |
tree | d56fdc8f4967c6c6df5c1cf1f6d8970dab68ed78 /t | |
parent | dae2d13f8edc3ee84694ec70a87a495ba78e08f2 (diff) | |
download | perl-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-x | t/op/goto.t | 17 |
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: |