diff options
author | Anton Berezin <tobez@tobez.org> | 1998-07-21 23:46:45 +0200 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-22 07:51:56 +0000 |
commit | fc360e464b2c0ad9f690711276bbd836ab5c39af (patch) | |
tree | ff6e6286015741969cb0226925752b07f08f11d9 /t/op | |
parent | cd25c7652ae5d63e9176061aadccb0202c32b84d (diff) | |
download | perl-fc360e464b2c0ad9f690711276bbd836ab5c39af.tar.gz |
t/op/eval.t test for eval & scoping of lexicals
Message-Id: <199807211946.VAA01301@lion.plab.ku.dk>
p4raw-id: //depot/perl@1632
Diffstat (limited to 't/op')
-rwxr-xr-x | t/op/eval.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/op/eval.t b/t/op/eval.t index 02b1045344..9368281d5b 100755 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -2,7 +2,7 @@ # $RCSfile: eval.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:48 $ -print "1..22\n"; +print "1..23\n"; eval 'print "ok 1\n";'; @@ -71,4 +71,11 @@ eval { print $b eq 'S' ? "ok 21\n" : "# $b\nnot ok 21\n"; eval $a; print $b eq 'V' ? "ok 22\n" : "# $b\nnot ok 22\n"; + + $b = 'wrong'; + $x = sub { + my $b = "right"; + print eval('"$b"') eq $b ? "ok 23\n" : "not ok 23\n"; + }; + &$x(); } |