From 500960a6f90e95877f90eef273215f16726946b1 Mon Sep 17 00:00:00 2001 From: Rick Delaney Date: Sat, 7 Jul 2007 19:06:11 -0400 Subject: Re: [perl #43545] 'no warnings' effects $@. Message-ID: <20070708030611.GJ436@bort.ca> p4raw-id: //depot/perl@31587 --- t/op/eval.t | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/op/eval.t b/t/op/eval.t index 57e39dd928..2eb9b1e9ed 100755 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -print "1..94\n"; +print "1..95\n"; eval 'print "ok 1\n";'; @@ -455,7 +455,14 @@ print "ok $test - eval and last\n"; $test++; local $@ = "foo"; eval undef; print "not " unless $@ eq ""; - print "ok $test # eval unef \n"; $test++; + print "ok $test # eval undef \n"; $test++; +} + +{ + no warnings; + eval "/ /a;"; + print "not " unless $@ =~ /^syntax error/; + print "ok $test # eval syntax error, no warnings \n"; $test++; } -- cgit v1.2.1