2 # Testing Cwd under taint mode.
7 chdir 't' unless $ENV{PERL_CORE};
10 use lib File::Spec->catdir('t', 'lib');
16 : (skip_all => "A perl without taint support")
20 use Scalar::Util qw/tainted/;
22 my @Functions = qw(getcwd cwd fastcwd fastgetcwd
23 abs_path fast_abs_path
24 realpath fast_realpath
27 foreach my $func (@Functions) {
30 eval { $cwd = &{'Cwd::'.$func} };
31 is( $@, '', "$func() should not explode under taint mode" );
32 ok( tainted($cwd), "its return value should be tainted" );
35 # Previous versions of Cwd tainted $^O
36 is !tainted($^O), 1, "\$^O should not be tainted";