diff options
Diffstat (limited to 'dist/PathTools/t/Spec-taint.t')
-rw-r--r-- | dist/PathTools/t/Spec-taint.t | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dist/PathTools/t/Spec-taint.t b/dist/PathTools/t/Spec-taint.t new file mode 100644 index 0000000000..ef4f1ee3f2 --- /dev/null +++ b/dist/PathTools/t/Spec-taint.t @@ -0,0 +1,17 @@ +#!./perl -Tw +# Testing File::Spec under taint mode. + +use strict; + +chdir 't' unless $ENV{PERL_CORE}; + +use File::Spec; +use lib File::Spec->catdir('t', 'lib'); +use Test::More tests => 2; + +use Scalar::Util qw/tainted/; + +my $ret; +eval { $ret = File::Spec->tmpdir }; +is( $@, '', "tmpdir should not explode under taint mode" ); +ok( !tainted($ret), "its return value should not be tainted" ); |