summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2006-11-02 17:36:33 +0000
committerDave Mitchell <davem@fdisolutions.com>2006-11-02 17:36:33 +0000
commiteb0348242d61a494f99b29d5799609411296b7da (patch)
tree150bf0918c0619464e3d5c520e0236cae9be5416 /t
parent0eb20fa22aa27beb10ebb64e033f5856e121ab29 (diff)
downloadperl-eb0348242d61a494f99b29d5799609411296b7da.tar.gz
add test that eval undef clears $@
p4raw-id: //depot/perl@29194
Diffstat (limited to 't')
-rwxr-xr-xt/op/eval.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/op/eval.t b/t/op/eval.t
index d64504c1ee..7ab73ed5d6 100755
--- a/t/op/eval.t
+++ b/t/op/eval.t
@@ -5,7 +5,7 @@ BEGIN {
@INC = '../lib';
}
-print "1..92\n";
+print "1..93\n";
eval 'print "ok 1\n";';
@@ -449,3 +449,12 @@ stderr => 1);
print "not " unless $got eq "ok\n";
print "ok $test - eval and last\n"; $test++;
+# eval undef should be the same as eval "" barring any warnings
+
+{
+ local $@ = "foo";
+ eval undef;
+ print "not " unless $@ eq "";
+ print "ok $test # eval unef \n"; $test++;
+}
+