summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-04-13 10:31:49 +0100
committerNicholas Clark <nick@ccl4.org>2009-04-13 10:31:49 +0100
commitf9cd5d9f11faa2de88f900872c21e75c5d491a24 (patch)
tree89c06ada349ef7eb017e08955c5e749561964ae8
parent6ee4ed10654cdc601734d15a3b6dda2ecdd44527 (diff)
downloadperl-f9cd5d9f11faa2de88f900872c21e75c5d491a24.tar.gz
Tweak t/lib/common.pl to use test.pl's (better) tempfile() function.
-rw-r--r--t/lib/common.pl6
1 files changed, 2 insertions, 4 deletions
diff --git a/t/lib/common.pl b/t/lib/common.pl
index 1544df570e..b300400db5 100644
--- a/t/lib/common.pl
+++ b/t/lib/common.pl
@@ -15,9 +15,7 @@ our $pragma_name;
$| = 1;
my $Is_MacOS = $^O eq 'MacOS';
-my $tmpfile = "tmp0000";
-1 while -e ++$tmpfile;
-END { 1 while unlink $tmpfile }
+my $tmpfile = tempfile();
my @prgs = () ;
my @w_files = () ;
@@ -129,7 +127,7 @@ for (@prgs){
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN
- $results =~ s/tmp\d+/-/g;
+ $results =~ s/$::tempfile_regexp/-/g;
if ($^O eq 'VMS') {
# some tests will trigger VMS messages that won't be expected
$results =~ s/\n?%[A-Z]+-[SIWEF]-[A-Z]+,.*//;