2 # Testing Cwd under taint mode.
16 use lib File::Spec->catdir('t', 'lib');
17 use Test::More tests => 17;
19 use Scalar::Util qw/tainted/;
21 my @Functions = qw(getcwd cwd fastcwd fastgetcwd
22 abs_path fast_abs_path
23 realpath fast_realpath
26 foreach my $func (@Functions) {
29 eval { $cwd = &{'Cwd::'.$func} };
30 is( $@, '', "$func() should not explode under taint mode" );
31 ok( tainted($cwd), "its return value should be tainted" );
34 # Previous versions of Cwd tainted $^O
35 is !tainted($^O), 1, "\$^O should not be tainted";