summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-02-28 14:05:38 +0000
committerNicholas Clark <nick@ccl4.org>2011-02-28 14:05:38 +0000
commite2b4a08c75901ae8a8a00efe0bd4b0503f5d38d2 (patch)
tree9bb978571e16339f464b49fefe0d2049545a5b43
parentbbe548ff05936cdfd51ceb406ef720e06799456e (diff)
downloadperl-e2b4a08c75901ae8a8a00efe0bd4b0503f5d38d2.tar.gz
Correct taint.t to skip the truncate test if $Config{d_truncate} is false.
Previously it had a comment, present since 5.003_92, that "There is no feature test in $Config{} for truncate, so we allow for the possibility that it's d missing." This was never correct, as 5.000 had d_truncate, and taint.t had analogous tests for $Config{d_chown} etc.
-rw-r--r--t/op/taint.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/op/taint.t b/t/op/taint.t
index 100d4f7c03..a940493f8d 100644
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -1040,10 +1040,12 @@ SKIP: {
test !eval { chmod 0, $TAINT }, 'chmod';
test $@ =~ /^Insecure dependency/, $@;
- # There is no feature test in $Config{} for truncate,
- # so we allow for the possibility that it's missing.
- test !eval { truncate 'NoSuChFiLe', $TAINT0 }, 'truncate';
- test $@ =~ /^(?:Insecure dependency|truncate not implemented)/, $@;
+ SKIP: {
+ skip "truncate() is not available", 2 unless $Config{d_truncate};
+
+ test !eval { truncate 'NoSuChFiLe', $TAINT0 }, 'truncate';
+ test $@ =~ /^Insecure dependency/, $@;
+ }
test !eval { rename '', $TAINT }, 'rename';
test $@ =~ /^Insecure dependency/, $@;