1#!./perl -Tw 2# Testing File::Spec under taint mode. 3 4use strict; 5 6chdir 't' unless $ENV{PERL_CORE}; 7 8use File::Spec; 9use lib File::Spec->catdir('t', 'lib'); 10use Test::More tests => 2; 11 12use Scalar::Util qw/tainted/; 13 14my $ret; 15eval { $ret = File::Spec->tmpdir }; 16is( $@, '', "tmpdir should not explode under taint mode" ); 17ok( !tainted($ret), "its return value should not be tainted" ); 18