Commit | Line | Data |
9ce33444 |
1 | #!/usr/bin/perl -Tw |
7a5004db |
2 | |
3 | BEGIN { |
b78fd716 |
4 | # ./lib is there so t/lib can be seen even after we chdir. |
5 | unshift @INC, 't/lib', './lib'; |
7a5004db |
6 | } |
39234879 |
7 | chdir 't'; |
7a5004db |
8 | |
a67d7a01 |
9 | use Test::More tests => 5; |
7a5004db |
10 | |
39234879 |
11 | BEGIN { |
12 | # non-core tests will have blib in their path. We remove it |
13 | # and just use the one in lib/. |
14 | unless( $ENV{PERL_CORE} ) { |
15 | @INC = grep !/blib/, @INC; |
16 | unshift @INC, '../lib'; |
17 | } |
18 | } |
19 | |
20 | my @blib_paths = grep /blib/, @INC; |
7a5004db |
21 | is( @blib_paths, 0, 'No blib dirs yet in @INC' ); |
22 | |
23 | use_ok( 'ExtUtils::testlib' ); |
24 | |
25 | @blib_paths = grep { /blib/ } @INC; |
26 | is( @blib_paths, 2, 'ExtUtils::testlib added two @INC dirs!' ); |
9ce33444 |
27 | ok( !(grep !File::Spec->file_name_is_absolute($_), @blib_paths), |
28 | ' and theyre absolute'); |
a67d7a01 |
29 | |
30 | eval { eval "# @INC"; }; |
31 | is( $@, '', '@INC is not tainted' ); |