summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2001-12-29 22:42:37 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-29 20:22:57 +0000
commitd1e4d418969ad3c5103f26f33d0abea5b1570935 (patch)
treea0d4611eb75d8f94e2d42291b944bf356edb8c70 /t/comp
parentcb69f87a007debfba124ee7db6ef7f6a2ac42df7 (diff)
downloadperl-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 't/comp')
-rwxr-xr-xt/comp/cpp.aux4
-rwxr-xr-xt/comp/multiline.t2
-rwxr-xr-xt/comp/require.t2
-rwxr-xr-xt/comp/script.t2
4 files changed, 5 insertions, 5 deletions
diff --git a/t/comp/cpp.aux b/t/comp/cpp.aux
index 058903294e..9452bddbbe 100755
--- a/t/comp/cpp.aux
+++ b/t/comp/cpp.aux
@@ -25,11 +25,11 @@ X#endif
Xprint $ok;
END
print TRY $prog;
-close TRY;
+close TRY or die "Could not close Comp_cpp.tmp: $!";
open(TRY,">Comp_cpp.inc") || (die "Can't open temp include file: $!");
print TRY '#define OK "ok 3\n"' . "\n";
-close TRY;
+close TRY or die "Could not close Comp_cpp.tmp: $!";
print `$^X "-P" Comp_cpp.tmp`;
unlink "Comp_cpp.tmp", "Comp_cpp.inc";
diff --git a/t/comp/multiline.t b/t/comp/multiline.t
index 742ba4965d..78820c4e92 100755
--- a/t/comp/multiline.t
+++ b/t/comp/multiline.t
@@ -26,7 +26,7 @@ $y = 'now is the time' . "\n" .
is($x, $y, 'test data is sane');
print TRY $x;
-close TRY;
+close TRY or die "Could not close: $!";
open(TRY,'Comp.try') || (die "Can't reopen temp file.");
$count = 0;
diff --git a/t/comp/require.t b/t/comp/require.t
index 103a579235..ea4b96d20b 100755
--- a/t/comp/require.t
+++ b/t/comp/require.t
@@ -27,7 +27,7 @@ sub write_file {
binmode REQ;
use bytes;
print REQ @_;
- close REQ;
+ close REQ or die "Could not close $f: $!";
}
eval {require 5.005};
diff --git a/t/comp/script.t b/t/comp/script.t
index d70b767478..2dbdaf2afc 100755
--- a/t/comp/script.t
+++ b/t/comp/script.t
@@ -16,7 +16,7 @@ if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
open(try,">Comp.script") || (die "Can't open temp file.");
print try 'print "ok\n";'; print try "\n";
-close try;
+close try or die "Could not close: $!";
$x = `$Perl Comp.script`;