summaryrefslogtreecommitdiff
path: root/lib/charnames.t
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2008-09-16 12:35:11 -0400
committerNicholas Clark <nick@ccl4.org>2008-09-16 21:04:14 +0000
commitf89542f789fc8ac88f7cd7e93bb8d9cd6228182b (patch)
treec00204c6fe3efbdea898f7de830e86f22bfc2ae0 /lib/charnames.t
parent3affb40daa9f27a344173c8cba505eb967c64b0f (diff)
downloadperl-f89542f789fc8ac88f7cd7e93bb8d9cd6228182b.tar.gz
Don't reuse temp files in tests
From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510809161335j73312da3v90fa6ef0cb8ac7c@mail.gmail.com> Date: Tue, 16 Sep 2008 16:35:11 -0400 p4raw-id: //depot/perl@34377
Diffstat (limited to 'lib/charnames.t')
-rw-r--r--lib/charnames.t4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/charnames.t b/lib/charnames.t
index 4889562455..5a6671ba7b 100644
--- a/lib/charnames.t
+++ b/lib/charnames.t
@@ -271,10 +271,8 @@ print "ok 46\n";
# ---- Alias extensions
-my $tmpfile = tempfile();
my $alifile = File::Spec->catfile(File::Spec->updir, qw(lib unicore xyzzy_alias.pl));
my $i = 0;
-END { if ($tmpfile) { 1 while unlink $tmpfile; } }
my @prgs;
{ local $/ = undef;
@@ -285,6 +283,7 @@ my $i = 46;
for (@prgs) {
my ($code, $exp) = ((split m/\nEXPECT\n/), '$');
my ($prog, $fil) = ((split m/\nFILE\n/, $code), "");
+ my $tmpfile = tempfile();
open my $tmp, "> $tmpfile" or die "Could not open $tmpfile: $!";
print $tmp $prog, "\n";
close $tmp or die "Could not close $tmpfile: $!";
@@ -322,7 +321,6 @@ for (@prgs) {
print "not ";
}
print "ok ", ++$i, "\n";
- 1 while unlink $tmpfile;
$fil or next;
1 while unlink $alifile;
}