summaryrefslogtreecommitdiff
path: root/t/op/do.t
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/op/do.t
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/op/do.t')
-rwxr-xr-xt/op/do.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/op/do.t b/t/op/do.t
index 913481feb1..744a62b3c3 100755
--- a/t/op/do.t
+++ b/t/op/do.t
@@ -61,31 +61,31 @@ unshift @INC, '.';
if (open(DO, ">$$.16")) {
print DO "ok(1, 'do in scalar context') if defined wantarray && not wantarray\n";
- close DO;
+ close DO or die "Could not close: $!";
}
my $a = do "$$.16";
if (open(DO, ">$$.17")) {
print DO "ok(1, 'do in list context') if defined wantarray && wantarray\n";
- close DO;
+ close DO or die "Could not close: $!";
}
my @a = do "$$.17";
if (open(DO, ">$$.18")) {
print DO "ok(1, 'do in void context') if not defined wantarray\n";
- close DO;
+ close DO or die "Could not close: $!";
}
do "$$.18";
# bug ID 20010920.007
eval qq{ do qq(a file that does not exist); };
-ok( !$@ );
+ok( !$@, "do on a non-existing file, first try" );
eval qq{ do uc qq(a file that does not exist); };
-ok( !$@ );
+ok( !$@, "do on a non-existing file, second try" );
END {
1 while unlink("$$.16", "$$.17", "$$.18");