summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-05-24 11:57:21 +0200
committerNicholas Clark <nick@ccl4.org>2012-05-31 18:09:46 +0200
commit8f67f7cf935f1eccce5950cc26b42d2dd4e10602 (patch)
tree83f2664df4e09a6e5476616c9f7eaafd4a1a466f
parente687eccd5383c3e09f3fa6fb6761a4949e743d51 (diff)
downloadperl-8f67f7cf935f1eccce5950cc26b42d2dd4e10602.tar.gz
In t/op/filetest.t, use the tempfile instead of t/TEST in two tests.
This avoids needing to skip the two tests if t/TEST is a symlink, which is the case when building with -Dmksymlinks.
-rw-r--r--t/op/filetest.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/op/filetest.t b/t/op/filetest.t
index 5a76763108..63c9181868 100644
--- a/t/op/filetest.t
+++ b/t/op/filetest.t
@@ -89,21 +89,21 @@ like $@, qr/^The stat preceding -l _ wasn't an lstat at /,
}
# Make sure -l is using the previous stat buffer, and not using the previ-
# ous op’s return value as a file name.
+# t/TEST can be a symlink under -Dmksymlinks, so use our temporary file.
SKIP: {
use Perl::OSType 'os_type';
if (os_type ne 'Unix') { skip "Not Unix", 2 }
- if (-l "TEST") { skip "TEST is a symlink", 2 }
chomp(my $ln = `which ln`);
if ( ! -e $ln ) { skip "No ln" , 2 }
- lstat "TEST";
- `ln -s TEST 1`;
+ lstat $ro_empty_file;
+ `ln -s $ro_empty_file 1`;
ok ! -l -e _, 'stacked -l uses previous stat, not previous retval';
unlink 1;
# Since we already have our skip block set up, we might as well put this
# test here, too:
# -l always treats a non-bareword argument as a file name
- system qw "ln -s TEST", \*foo;
+ system 'ln', '-s', $ro_empty_file, \*foo;
local $^W = 1;
ok -l \*foo, '-l \*foo is a file name';
unlink \*foo;