X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fde-dup.t;h=56b508ccb1b1cfa8d69c97a70678554574fb7397;hb=67502693237dae374a11cae2e91bac57d2d8e4c9;hp=51ef4f1e54aca05da0e320f9eac3e5dc34fb309c;hpb=f73494426ccdd9f1e747dafa1b79c1c4b279d3ac;p=p5sagit%2Flocal-lib.git diff --git a/t/de-dup.t b/t/de-dup.t index 51ef4f1..56b508c 100644 --- a/t/de-dup.t +++ b/t/de-dup.t @@ -1,11 +1,10 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 2; + use File::Temp qw(tempdir); use Cwd; -plan tests => 4; - my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1); use local::lib (); @@ -19,14 +18,3 @@ local::lib->import($dir); ok ! grep({ $inc{$_} > 1 } keys %inc), '@INC entries not duplicated'; ok ! grep({ $perl5lib{$_} > 1 } keys %perl5lib), 'ENV{PERL5LIB} entries not duplicated'; } - -local::lib->import('--self-contained', $dir); - -{ - my (%inc, %perl5lib); - map { $inc{$_}++ } @INC; - map { $perl5lib{$_} } split /:/, $ENV{PERL5LIB}; - ok ! grep({ $inc{$_} > 1 } keys %inc), '@INC entries not duplicated (--self-contained)'; - ok ! grep({ $perl5lib{$_} > 1 } keys %perl5lib), 'ENV{PERL5LIB} entries not duplicated (--self-contained)'; -} -