avoid temp file littering in tests
authorGurusamy Sarathy <gsar@cpan.org>
Sun, 5 Aug 2001 16:45:54 +0000 (16:45 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 5 Aug 2001 16:45:54 +0000 (16:45 +0000)
p4raw-id: //depot/perl@11585

ext/PerlIO/t/encoding.t
lib/Memoize/t/errors.t

index debd2bc..dc2b2ba 100644 (file)
@@ -36,7 +36,7 @@ if (open(UTF, "<$utf")) {
     # alpha beta gamma in UTF-8 Unicode (0x3b1 0x3b2 0x3b3)
     print "not " unless <UTF> 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 <GRK> eq "\xe1\xe2\xe3";
     print "ok 8\n";
-    close $grk;
+    close GRK;
 }
 
 END {
index 27daa92..2e81cdb 100755 (executable)
@@ -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++;
 }