summaryrefslogtreecommitdiff
path: root/ext/Safe
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2002-03-14 23:05:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-15 02:59:46 +0000
commita79a9020e55dfcfe528d3db9eb374a85be7f2602 (patch)
tree6e2ec49272179b210d6dcf0e34337501cbf580ff /ext/Safe
parentf8f99792a41bb8e3b8d79451b979dbe275636f1a (diff)
downloadperl-a79a9020e55dfcfe528d3db9eb374a85be7f2602.tar.gz
Re: Réf. : Re: PATCH proposal for ext/Safe/safe2.t
Message-ID: <20020314230522.GG363@Bagpuss.unfortu.net> p4raw-id: //depot/perl@15230
Diffstat (limited to 'ext/Safe')
-rwxr-xr-xext/Safe/safe2.t3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/Safe/safe2.t b/ext/Safe/safe2.t
index ddd1943005..d967b19634 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 {