X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftaint-mode.t;h=50735bf770434156f631e352b718075bc1732328;hb=7c0e6b545126be7e9f7eccc5dd7dbaa0c0128090;hp=f1a547f88e96f40b5bff0dbe39f519b8e719ed5b;hpb=24351831cd9bba6bc993566324483b05bbd5d52c;p=p5sagit%2Flocal-lib.git diff --git a/t/taint-mode.t b/t/taint-mode.t index f1a547f..50735bf 100644 --- a/t/taint-mode.t +++ b/t/taint-mode.t @@ -6,14 +6,13 @@ use strict; use warnings; -use Test::More; -use File::Temp qw(tempdir tempfile); +use Test::More tests => 1; +use File::Temp 'tempfile'; use Cwd; -plan tests => 1; +use lib 't/lib'; use TempDir; -# Setup temp dir to serve as local lib -my $dir1 = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1); +my $dir1 = mk_temp_dir('test_local_lib-XXXXX'); # Set up local::lib environment using our temp dir require local::lib; @@ -26,11 +25,14 @@ my ($fh, $filename) = tempfile('test_local_lib-XXXXX', DIR => Cwd::abs_path('t') print $fh <import(\$dir); +warn "using lib dir \$dir\\n"; +if (grep { m{^\\Q\$dir} } \@INC) { exit 0; } +warn '\@INC is: ', join("\\n", \@INC), "\\n"; exit 1 EOM close $fh;