1N/A#!/usr/bin/perl -Tw
1N/A
1N/ABEGIN {
1N/A if( $ENV{PERL_CORE} ) {
1N/A chdir 't' if -d 't';
1N/A @INC = '../lib';
1N/A }
1N/A else {
1N/A # ./lib is there so t/lib can be seen even after we chdir.
1N/A unshift @INC, 't/lib', './lib';
1N/A }
1N/A}
1N/Achdir 't';
1N/A
1N/Ause Test::More tests => 5;
1N/A
1N/ABEGIN {
1N/A # non-core tests will have blib in their path. We remove it
1N/A # and just use the one in lib/.
1N/A unless( $ENV{PERL_CORE} ) {
1N/A @INC = grep !/blib/, @INC;
1N/A unshift @INC, '../lib';
1N/A }
1N/A}
1N/A
1N/Amy @blib_paths = grep /blib/, @INC;
1N/Ais( @blib_paths, 0, 'No blib dirs yet in @INC' );
1N/A
1N/Ause_ok( 'ExtUtils::testlib' );
1N/A
1N/A@blib_paths = grep { /blib/ } @INC;
1N/Ais( @blib_paths, 2, 'ExtUtils::testlib added two @INC dirs!' );
1N/Aok( !(grep !File::Spec->file_name_is_absolute($_), @blib_paths),
1N/A ' and theyre absolute');
1N/A
1N/Aeval { eval "# @INC"; };
1N/Ais( $@, '', '@INC is not tainted' );