diff options
author | Steve Hay <SteveHay@planit.com> | 2005-01-10 11:53:10 +0000 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2005-01-10 11:53:10 +0000 |
commit | 846e3505506e5ca6188404fe694911fd9e543b20 (patch) | |
tree | c4de95c09b6c5e363ba7499bfc9ba69abe8a8001 | |
parent | 6c4b87ea2cf1b07b221a48a59b468e8aae9a0981 (diff) | |
download | perl-846e3505506e5ca6188404fe694911fd9e543b20.tar.gz |
Need to close files before unlinking them on Win32
(Various files created by test programs are left behind otherwise,
and distclean doesn't clean them up)
p4raw-id: //depot/perl@23778
-rw-r--r-- | lib/FileCache/t/01open.t | 1 | ||||
-rw-r--r-- | lib/FileCache/t/04twoarg.t | 1 | ||||
-rw-r--r-- | lib/FileCache/t/07noimport.t | 1 | ||||
-rwxr-xr-x | t/op/read.t | 3 |
4 files changed, 5 insertions, 1 deletions
diff --git a/lib/FileCache/t/01open.t b/lib/FileCache/t/01open.t index fa7f5f0e08..75da3b28d4 100644 --- a/lib/FileCache/t/01open.t +++ b/lib/FileCache/t/01open.t @@ -20,6 +20,7 @@ print "1..1\n"; for my $path ( @files ){ cacheout $path; print $path "$path 1\n"; + close $path; } print "not " unless scalar map({ -f } @files) == scalar @files; print "ok 1\n"; diff --git a/lib/FileCache/t/04twoarg.t b/lib/FileCache/t/04twoarg.t index a2a70be2b6..66da9719a2 100644 --- a/lib/FileCache/t/04twoarg.t +++ b/lib/FileCache/t/04twoarg.t @@ -21,4 +21,5 @@ print "1..1\n"; seek(foo, 0, 0); print 'not ' unless <foo> eq "foo 44\n"; print "ok 1\n"; + close foo; } diff --git a/lib/FileCache/t/07noimport.t b/lib/FileCache/t/07noimport.t index 0f19ada68d..d2f926ce5c 100644 --- a/lib/FileCache/t/07noimport.t +++ b/lib/FileCache/t/07noimport.t @@ -22,4 +22,5 @@ plan( tests => 1 ); FileCache::cacheout("<", $file); ::ok( <$file> eq "bar" ); + close $file; } diff --git a/t/op/read.t b/t/op/read.t index 4aaaeabdfe..99a62166ce 100755 --- a/t/op/read.t +++ b/t/op/read.t @@ -35,7 +35,7 @@ my $has_perlio = !eval { my $tmpfile = 'Op_read.tmp'; -1 while unlink $tmpfile; +END { 1 while unlink $tmpfile } my (@values, @buffers) = ('', ''); @@ -90,6 +90,7 @@ foreach my $value (@values) { $got = read (FH, $buffer, $length, $offset); is ($got, length $will_read, "got $what"); is ($buffer, $expect, "buffer $what"); + close FH; } } } |