summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/t/testlib.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExtUtils/t/testlib.t')
-rw-r--r--lib/ExtUtils/t/testlib.t20
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/ExtUtils/t/testlib.t b/lib/ExtUtils/t/testlib.t
index e0ef990f99..8c1ae11573 100644
--- a/lib/ExtUtils/t/testlib.t
+++ b/lib/ExtUtils/t/testlib.t
@@ -1,13 +1,25 @@
-#!./perl
+#!/usr/bin/perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
use Test::More tests => 3;
-my @blib_paths = grep { /blib/ } @INC;
+BEGIN {
+ # non-core tests will have blib in their path. We remove it
+ # and just use the one in lib/.
+ unless( $ENV{PERL_CORE} ) {
+ @INC = grep !/blib/, @INC;
+ unshift @INC, '../lib';
+ }
+}
+
+my @blib_paths = grep /blib/, @INC;
is( @blib_paths, 0, 'No blib dirs yet in @INC' );
use_ok( 'ExtUtils::testlib' );