blob: ef4f1ee3f2c62412fa7008cc959c6d6e2a7128af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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" );
|