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