From: Nicholas Clark Date: Tue, 6 Oct 2009 12:43:55 +0000 (+0200) Subject: Replace a hardcoded temporary file name with test.pl's tempfile(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6ddfe9e80dcd0e491ed20e28f11a5431e78989aa;p=p5sagit%2Fp5-mst-13.2.git Replace a hardcoded temporary file name with test.pl's tempfile(). --- diff --git a/t/uni/overload.t b/t/uni/overload.t index d7c06f5..e20a3ab 100644 --- a/t/uni/overload.t +++ b/t/uni/overload.t @@ -150,7 +150,7 @@ SKIP: { } } -my $tmpfile = 'overload.tmp'; +my $tmpfile = tempfile(); foreach my $operator ('print', 'syswrite', 'syswrite len', 'syswrite off', 'syswrite len off') { @@ -210,7 +210,6 @@ foreach my $operator ('print', 'syswrite', 'syswrite len', 'syswrite off', is ($line, "\351", "$operator $layer"); close $fh or die $!; - unlink $tmpfile or die $!; } } @@ -283,7 +282,3 @@ foreach my $value ("\243", UTF8Toggle->new("\243")) { my $p = substr $text, 0, 1; is ($p, "\x{3075}"); } - -END { - 1 while -f $tmpfile and unlink $tmpfile || die "unlink '$tmpfile': $!"; -}