normalize changelog formatting
[p5sagit/local-lib.git] / t / de-dup.t
1 use strict;
2 use warnings;
3 use Test::More tests => 2;
4
5 use File::Temp qw(tempdir);
6 use Cwd;
7
8 my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1);
9
10 use local::lib ();
11
12 my %inc;
13 my %perl5lib;
14
15 $inc{$_}--      for @INC;
16 $perl5lib{$_}-- for split /:/, $ENV{PERL5LIB};
17
18 local::lib->import($dir);
19 local::lib->import($dir);
20
21 $inc{$_}++      for @INC;
22 $perl5lib{$_}++ for split /:/, $ENV{PERL5LIB};
23
24 ok ! (grep { $inc{$_} > 1 } keys %inc), '@INC entries not duplicated';
25 ok ! (grep { $perl5lib{$_} > 1 } keys %perl5lib), 'ENV{PERL5LIB} entries not duplicated';