diff options
author | Andreas König <a.koenig@mind.de> | 2001-12-29 22:42:37 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-29 20:22:57 +0000 |
commit | d1e4d418969ad3c5103f26f33d0abea5b1570935 (patch) | |
tree | a0d4611eb75d8f94e2d42291b944bf356edb8c70 /ext | |
parent | cb69f87a007debfba124ee7db6ef7f6a2ac42df7 (diff) | |
download | perl-d1e4d418969ad3c5103f26f33d0abea5b1570935.tar.gz |
cleaner close on tests, take 2
Message-ID: <m33d1tvjuq.fsf@anima.de>
(except for the three DB_File patch fragments)
p4raw-id: //depot/perl@13940
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Devel/DProf/DProf.t | 2 | ||||
-rw-r--r-- | ext/PerlIO/t/encoding.t | 8 | ||||
-rw-r--r-- | ext/SDBM_File/sdbm.t | 2 | ||||
-rw-r--r-- | ext/Storable/t/store.t | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/ext/Devel/DProf/DProf.t b/ext/Devel/DProf/DProf.t index be711f1330..5ecba68b5b 100644 --- a/ext/Devel/DProf/DProf.t +++ b/ext/Devel/DProf/DProf.t @@ -49,7 +49,7 @@ sub profile { my $t_start = new Benchmark; open( R, "$perl \"$opt_d\" $test |" ) || warn "$0: Can't run. $!\n"; @results = <R>; - close R; + close R or warn "Could not close: $!"; my $t_total = timediff( new Benchmark, $t_start ); if( $opt_v ){ diff --git a/ext/PerlIO/t/encoding.t b/ext/PerlIO/t/encoding.t index e30e270535..eb523ca80d 100644 --- a/ext/PerlIO/t/encoding.t +++ b/ext/PerlIO/t/encoding.t @@ -19,7 +19,7 @@ my $russki = "koi8r$$"; if (open(GRK, ">$grk")) { # alpha beta gamma in ISO 8859-7 print GRK "\xe1\xe2\xe3"; - close GRK; + close GRK or die "Could not close: $!"; } { @@ -30,7 +30,7 @@ if (open(GRK, ">$grk")) { print "ok 2\n"; print $o readline($i); print "ok 3\n"; - close($o); + close($o) or die "Could not close: $!"; close($i); } @@ -49,7 +49,7 @@ if (open(UTF, "<$utf")) { print "ok 6\n"; print $o readline($i); print "ok 7\n"; - close($o); + close($o) or die "Could not close: $!"; close($i); } @@ -76,7 +76,7 @@ if (!defined $warn) { if (open(RUSSKI, ">$russki")) { print RUSSKI "\x3c\x3f\x78"; - close RUSSKI; + close RUSSKI or die "Could not close: $!"; open(RUSSKI, "$russki"); binmode(RUSSKI, ":raw"); my $buf1; diff --git a/ext/SDBM_File/sdbm.t b/ext/SDBM_File/sdbm.t index e1ed259bfa..f1a5c63169 100644 --- a/ext/SDBM_File/sdbm.t +++ b/ext/SDBM_File/sdbm.t @@ -183,7 +183,7 @@ print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n"); 1 ; EOM - close FILE ; + close FILE or die "Could not close: $!"; BEGIN { push @INC, '.'; } diff --git a/ext/Storable/t/store.t b/ext/Storable/t/store.t index d26755f129..b09b125c0d 100644 --- a/ext/Storable/t/store.t +++ b/ext/Storable/t/store.t @@ -113,7 +113,7 @@ eval { $r = fd_retrieve(::OUT); }; print "not " unless $@; print "ok 20\n"; -close OUT; +close OUT or die "Could not close: $!"; END { 1 while unlink 'store' } |