From: Nicholas Clark Date: Thu, 14 Mar 2002 23:05:23 +0000 (+0000) Subject: Re: Réf. : Re: PATCH proposal for ext/Safe/safe2.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a79a9020e55dfcfe528d3db9eb374a85be7f2602;p=p5sagit%2Fp5-mst-13.2.git Re: Réf. : Re: PATCH proposal for ext/Safe/safe2.t Message-ID: <20020314230522.GG363@Bagpuss.unfortu.net> p4raw-id: //depot/perl@15230 --- diff --git a/ext/Safe/safe2.t b/ext/Safe/safe2.t index ddd1943..d967b19 100755 --- a/ext/Safe/safe2.t +++ b/ext/Safe/safe2.t @@ -119,10 +119,13 @@ print $@ =~ /foo bar/ ? "ok 29\n" : "not ok 29\n"; # --- rdo my $t = 30; +$! = 0; my $nosuch = '/non/existant/file.name'; open(NOSUCH, $nosuch); if ($@) { my $errno = $!; + die "Eek! Attempting to open $nosuch failed, but \$! is still 0" unless $!; + $! = 0; $cpt->rdo($nosuch); print $! == $errno ? "ok $t\n" : sprintf "not ok $t # \"$!\" is %d (expected %d)\n", $!, $errno; $t++; } else {