diff options
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 $@; +} |