From: Dave Mitchell Date: Thu, 2 Nov 2006 17:36:33 +0000 (+0000) Subject: add test that eval undef clears $@ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb0348242d61a494f99b29d5799609411296b7da;p=p5sagit%2Fp5-mst-13.2.git add test that eval undef clears $@ p4raw-id: //depot/perl@29194 --- diff --git a/t/op/eval.t b/t/op/eval.t index d64504c..7ab73ed 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++; +} +