summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2002-04-22 08:37:17 +0000
committerGurusamy Sarathy <gsar@cpan.org>2002-04-22 08:37:17 +0000
commit0ec158f4b0db050abb15876df15f5f883540cfd9 (patch)
tree65a29c8748f938194d687e43d98d4720da79686d
parent139cf11b10fe82ec7be04ae7d145dc452057d38b (diff)
downloadperl-0ec158f4b0db050abb15876df15f5f883540cfd9.tar.gz
clean up after stray test file littering
NOTE: PerlIO/t/via.t leaves behind a via$$ file on windows when it seems that it shouldn't (looks like a handle leak in PerlIO to me) p4raw-id: //depot/perl@16065
-rwxr-xr-xlib/FileCache.t7
-rw-r--r--lib/Pod/t/eol.t4
-rw-r--r--lib/Tie/File/t/31_autodefer.t2
-rw-r--r--lib/Tie/File/t/32_defer_misc.t2
-rw-r--r--lib/Tie/File/t/33_defer_vs.t2
-rw-r--r--t/lib/warnings/perlio3
-rw-r--r--t/win32/system.t3
7 files changed, 18 insertions, 5 deletions
diff --git a/lib/FileCache.t b/lib/FileCache.t
index 87bfd951d9..1d91d210ab 100755
--- a/lib/FileCache.t
+++ b/lib/FileCache.t
@@ -24,11 +24,11 @@ my @files = qw(foo bar baz quux);
my @cat;
for my $path ( @files ){
print $path "$path 2\n";
- close($path);
+ close($path);
open($path, $path);
<$path>;
push @cat, <$path>;
- close($path);
+ close($path);
}
print "not " if (grep {/foo|bar/} @cat) && ! (grep {/baz|quux/} @cat);
print "ok 2\n" ;
@@ -57,6 +57,7 @@ my @files = qw(foo bar baz quux);
cacheout '<', "foo";
print "not " unless <foo> eq "foo 2\n";
print "ok 4\n";
+ close(foo);
}
{# Test 5: that close is overridden properly
@@ -68,6 +69,7 @@ my @files = qw(foo bar baz quux);
seek($_, 0, 0);
print "not " unless <$_> eq "$_\n";
print "ok 5\n";
+ close($_);
}
q(
@@ -82,6 +84,7 @@ q(
seek($_, 0, 0);
print "not " unless <$_> eq "$_\n";
print "ok 5\n";
+ close($_);
}
);
diff --git a/lib/Pod/t/eol.t b/lib/Pod/t/eol.t
index ea2c259384..331d27f167 100644
--- a/lib/Pod/t/eol.t
+++ b/lib/Pod/t/eol.t
@@ -94,7 +94,9 @@ my $cksum3 = unpack("%32C*", <IN>);
ok($cksum1 == $cksum2, "CR vs LF");
ok($cksum1 == $cksum3, "CR vs CRLF");
ok($cksum2 == $cksum3, "LF vs CRLF");
+close IN;
END {
- 1 while unlink("$$.pod", "$$.in", "$$.o1", "$$.o2", "$$.o3");
+ 1 while unlink("$$.pod", "$$.in", "$$.o1", "$$.o2", "$$.o3",
+ "pod2htmd.x~~", "pod2htmi.x~~");
}
diff --git a/lib/Tie/File/t/31_autodefer.t b/lib/Tie/File/t/31_autodefer.t
index 53371c0138..ea929a4097 100644
--- a/lib/Tie/File/t/31_autodefer.t
+++ b/lib/Tie/File/t/31_autodefer.t
@@ -175,6 +175,8 @@ sub ctrlfix {
}
END {
+ undef $o;
+ untie @a;
1 while unlink $file;
}
diff --git a/lib/Tie/File/t/32_defer_misc.t b/lib/Tie/File/t/32_defer_misc.t
index 5193cf0ca3..e0e3f15bb8 100644
--- a/lib/Tie/File/t/32_defer_misc.t
+++ b/lib/Tie/File/t/32_defer_misc.t
@@ -225,6 +225,8 @@ sub ctrlfix {
}
END {
+ undef $o;
+ untie @a;
1 while unlink $file;
}
diff --git a/lib/Tie/File/t/33_defer_vs.t b/lib/Tie/File/t/33_defer_vs.t
index 69f32a6284..071af77a68 100644
--- a/lib/Tie/File/t/33_defer_vs.t
+++ b/lib/Tie/File/t/33_defer_vs.t
@@ -118,6 +118,8 @@ sub ctrlfix {
}
END {
+ undef $o;
+ untie @a;
1 while unlink $file;
}
diff --git a/t/lib/warnings/perlio b/t/lib/warnings/perlio
index 7be021948c..63279ee0fe 100644
--- a/t/lib/warnings/perlio
+++ b/t/lib/warnings/perlio
@@ -29,6 +29,7 @@ no warnings 'layer';
open(F, ">:-aa", "bb");
use warnings 'layer';
open(F, ">:-aa", "bb");
+close F;
EXPECT
perlio: invalid separator character '-' in layer specification list -aa at - line 6.
########
@@ -38,6 +39,7 @@ no warnings 'layer';
open(F, ">:aa(", "bb");
use warnings 'layer';
open(F, ">:aa(", "bb");
+close F;
EXPECT
perlio: argument list not closed for layer "aa(" at - line 6.
########
@@ -50,6 +52,7 @@ no warnings 'layer';
open(F, ">:xyz", "bb");
use warnings 'layer';
open(F, ">:xyz", "bb");
+close F;
END { 1 while unlink "bb" } # KEEP THIS WITH THE LAST TEST.
EXPECT
perlio: unknown layer "xyz".
diff --git a/t/win32/system.t b/t/win32/system.t
index a0266da5ef..bd65412564 100644
--- a/t/win32/system.t
+++ b/t/win32/system.t
@@ -76,8 +76,7 @@ close $F;
# build the executable
chdir($testdir);
END {
-# chdir($cwd);
-# rmtree($testdir);
+ chdir($cwd) && rmtree("$cwd/$testdir") if -d "$cwd/$testdir";
}
if (open(my $EIN, "$cwd/op/${exename}_exe.uu")) {
print "# Unpacking $exename.exe\n";