This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Trouble with $ENV{CDPATH} after change #27236
authorDominic Dunlop <domo@computer.org>
Mon, 20 Feb 2006 14:49:00 +0000 (14:49 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 20 Feb 2006 17:59:42 +0000 (17:59 +0000)
Message-Id: <6393FA5A-6B84-46E9-A557-DED3BB0AD7EE@mac.com>

p4raw-id: //depot/perl@27248

t/op/utftaint.t

index 1cadc07..d9614e6 100644 (file)
@@ -143,16 +143,11 @@ for my $ary ([ascii => 'perl'], [latin1 => "\xB6"]) {
     is(tainted($taint), tainted($arg), "tainted: $encode, downgrade down");
 }
 
-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);
-    } 
+{
+    local @ENV{qw(PATH CDPATH IFS ENV BASH_ENV)} = (undef) x 5;
+    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"]},