From: Gurusamy Sarathy Date: Sun, 5 Aug 2001 16:45:54 +0000 (+0000) Subject: avoid temp file littering in tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=206b12d5641a74e09d210dd4ea3998febd96392f;p=p5sagit%2Fp5-mst-13.2.git avoid temp file littering in tests p4raw-id: //depot/perl@11585 --- diff --git a/ext/PerlIO/t/encoding.t b/ext/PerlIO/t/encoding.t index debd2bc..dc2b2ba 100644 --- a/ext/PerlIO/t/encoding.t +++ b/ext/PerlIO/t/encoding.t @@ -36,7 +36,7 @@ if (open(UTF, "<$utf")) { # alpha beta gamma in UTF-8 Unicode (0x3b1 0x3b2 0x3b3) print "not " unless eq "\xce\xb1\xce\xb2\xce\xb3"; print "ok 4\n"; - close $grk; + close UTF; } { @@ -54,7 +54,7 @@ if (open(UTF, "<$utf")) { if (open(GRK, "<$grk")) { print "not " unless eq "\xe1\xe2\xe3"; print "ok 8\n"; - close $grk; + close GRK; } END { diff --git a/lib/Memoize/t/errors.t b/lib/Memoize/t/errors.t index 27daa92..2e81cdb 100755 --- a/lib/Memoize/t/errors.t +++ b/lib/Memoize/t/errors.t @@ -33,7 +33,7 @@ for $mod (qw(DB_File GDBM_File SDBM_File ODBM_File NDBM_File)) { }; print $@ =~ /can only store scalars/ || $@ =~ /Can't locate.*in \@INC/ ? "ok $n\n" : "not ok $n # $@\n"; - 1 while unlink $dummyfile; + 1 while unlink $dummyfile, "$dummyfile.dir", "$dummyfile.pag"; $n++; }