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