From: Nicholas Clark Date: Mon, 13 Apr 2009 09:31:49 +0000 (+0100) Subject: Tweak t/lib/common.pl to use test.pl's (better) tempfile() function. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9cd5d9f11faa2de88f900872c21e75c5d491a24;p=p5sagit%2Fp5-mst-13.2.git Tweak t/lib/common.pl to use test.pl's (better) tempfile() function. --- diff --git a/t/lib/common.pl b/t/lib/common.pl index 1544df5..b300400 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]+,.*//;