summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/op/filetest.t13
-rwxr-xr-xt/op/sysio.t3
-rwxr-xr-xt/op/taint.t2
3 files changed, 10 insertions, 8 deletions
diff --git a/t/op/filetest.t b/t/op/filetest.t
index 97ce3f9bf6..c73d747ba7 100755
--- a/t/op/filetest.t
+++ b/t/op/filetest.t
@@ -80,13 +80,14 @@ ok( (-s -f 'TEST' > 1), "-s returns real size" );
ok( -f -s 'TEST' == 1 );
# now with an empty file
-open my $fh, ">", "foo";
+my $tempfile = tempfile();
+open my $fh, ">", $tempfile;
close $fh;
-ok( -f "foo" );
-is( -s "foo", 0 );
-is( -f -s "foo", 0 );
-is( -s -f "foo", 0 );
-unlink "foo";
+ok( -f $tempfile );
+is( -s $tempfile, 0 );
+is( -f -s $tempfile, 0 );
+is( -s -f $tempfile, 0 );
+unlink $tempfile;
# test that _ is a bareword after filetest operators
diff --git a/t/op/sysio.t b/t/op/sysio.t
index 435be12efb..dd63a1588c 100755
--- a/t/op/sysio.t
+++ b/t/op/sysio.t
@@ -4,6 +4,7 @@ print "1..42\n";
chdir('op') || chdir('t/op') || die "sysio.t: cannot look for myself: $!";
@INC = '../../lib';
+require '../test.pl';
open(I, 'sysio.t') || die "sysio.t: cannot find myself: $!";
@@ -60,7 +61,7 @@ print "ok 9\n";
print 'not ' unless ($a eq "#!.\0\0erl");
print "ok 10\n";
-$outfile = 'sysio.out';
+$outfile = tempfile();
open(O, ">$outfile") || die "sysio.t: cannot write $outfile: $!";
diff --git a/t/op/taint.t b/t/op/taint.t
index 2dc1bb9883..01ab368607 100755
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -285,7 +285,7 @@ my $TEST = catfile(curdir(), 'TEST');
# How about command-line arguments? The problem is that we don't
# always get some, so we'll run another process with some.
SKIP: {
- my $arg = catfile(curdir(), tempfile());
+ my $arg = tempfile();
open PROG, "> $arg" or die "Can't create $arg: $!";
print PROG q{
eval { join('', @ARGV), kill 0 };