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 /t/op/do.t | |
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 't/op/do.t')
-rwxr-xr-x | t/op/do.t | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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"); |