diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-03-14 21:45:59 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-03-14 21:45:59 +0000 |
commit | 2615d17588e4672c186571321fd3845bf795ed28 (patch) | |
tree | 507c4caff1f79bfdd2b1ce5b37d4effc0ecc7622 /t/op/eval.t | |
parent | 9189260c7d97414c1c74cebb8675588bf7078305 (diff) | |
parent | 5da4baf7965da69c0b59c8683d446777cff89c61 (diff) | |
download | perl-2615d17588e4672c186571321fd3845bf795ed28.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@9159
Diffstat (limited to 't/op/eval.t')
-rwxr-xr-x | t/op/eval.t | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/t/op/eval.t b/t/op/eval.t index 11fbfd06de..f4d4be5ab7 100755 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -1,6 +1,6 @@ #!./perl -print "1..40\n"; +print "1..41\n"; eval 'print "ok 1\n";'; @@ -206,3 +206,18 @@ print $@; print "ok $x\n"; $x++; } + +# Check that eval catches bad goto calls +# (BUG ID 20010305.003) +{ + eval { + eval { goto foo; }; + print ($@ ? "ok 41\n" : "not ok 41\n"); + last; + foreach my $i (1) { + foo: print "not ok 41\n"; + print "# jumped into foreach\n"; + } + }; + print "not ok 41\n" if $@; +} |