summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-20 00:36:34 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-20 00:36:34 +0000
commite7b79d5064e218180834206ebc0da9a68d87f20e (patch)
tree51c67e4595bd4f4edbd31d31f86d165df58dc69f /t
parent1a5b3db469280dd5cf664d996d7209b0219449ef (diff)
downloadperl-e7b79d5064e218180834206ebc0da9a68d87f20e.tar.gz
utftaint.t won't be able to run tests with -T if you have
Insecure directory in $ENV{PATH} so skip them. (Probably this means you have . in your PATH) p4raw-id: //depot/perl@27236
Diffstat (limited to 't')
-rw-r--r--t/op/utftaint.t22
1 files changed, 15 insertions, 7 deletions
diff --git a/t/op/utftaint.t b/t/op/utftaint.t
index 1294526d2b..1cadc07627 100644
--- a/t/op/utftaint.t
+++ b/t/op/utftaint.t
@@ -143,10 +143,18 @@ for my $ary ([ascii => 'perl'], [latin1 => "\xB6"]) {
is(tainted($taint), tainted($arg), "tainted: $encode, downgrade down");
}
-fresh_perl_is('$a = substr $^X, 0, 0; /\x{100}/i; /$a\x{100}/i || print q,ok,',
- 'ok', {switches => ["-T", "-l"]},
- "matching a regexp is taint agnostic");
-
-fresh_perl_is('$a = substr $^X, 0, 0; /$a\x{100}/i || print q,ok,',
- 'ok', {switches => ["-T", "-l"]},
- "therefore swash_init should be taint agnostic");
+SKIP: {
+ eval {
+ fresh_perl_is('$a = substr $^X, 0, 0; /\x{100}/i; /$a\x{100}/i || print q,ok,',
+ 'ok', {switches => ["-T", "-l"]},
+ "matching a regexp is taint agnostic");
+ };
+ if ($@ =~ /^Insecure directory in/) {
+ chomp $@;
+ skip ("Can't run taint checks with $@", 2);
+ }
+
+ fresh_perl_is('$a = substr $^X, 0, 0; /$a\x{100}/i || print q,ok,',
+ 'ok', {switches => ["-T", "-l"]},
+ "therefore swash_init should be taint agnostic");
+}