Change 11585 by gsar@moonru on 2001/08/05 16:45:54

        avoid temp file littering in tests

Affected files ...

... //depot/perl/ext/PerlIO/t/encoding.t#4 edit
... //depot/perl/lib/Memoize/t/errors.t#3 edit

Differences ...

==== //depot/perl/ext/PerlIO/t/encoding.t#4 (text) ====
Index: perl/ext/PerlIO/t/encoding.t
--- perl/ext/PerlIO/t/encoding.t.~1~    Sun Aug  5 11:00:06 2001
+++ perl/ext/PerlIO/t/encoding.t        Sun Aug  5 11:00:06 2001
@@ -36,7 +36,7 @@
     # 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(GRK, "<$grk")) {
     print "not " unless <GRK> eq "\xe1\xe2\xe3";
     print "ok 8\n";
-    close $grk;
+    close GRK;
 }
 
 END {

==== //depot/perl/lib/Memoize/t/errors.t#3 (xtext) ====
Index: perl/lib/Memoize/t/errors.t
--- perl/lib/Memoize/t/errors.t.~1~     Sun Aug  5 11:00:06 2001
+++ perl/lib/Memoize/t/errors.t Sun Aug  5 11:00:06 2001
@@ -33,7 +33,7 @@
   };
   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++;
 }
 
End of Patch.

Reply via email to