summaryrefslogtreecommitdiff
path: root/t/TEST
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-02-07 15:36:40 +0000
committerNicholas Clark <nick@ccl4.org>2011-02-07 16:33:12 +0000
commit76cc22ec8d16738e37cbdd3bb7205aed330bd0e7 (patch)
treeb8c715f4bf1f881b4633e59ce158848c2cb82490 /t/TEST
parentbe2b6a899980e0f4af70e797c0fdaeec6dd6a7d9 (diff)
downloadperl-76cc22ec8d16738e37cbdd3bb7205aed330bd0e7.tar.gz
When running tests from lib/, set @INC and $ENV{PERL5LIB} to ../lib
This ensures (reasonable) consistency with tests in cpan/, dist/ and ext/, which set this to qw(../../lib ../../t), but are not from t/, hence don't have t/ implicitly in @INC as '.'
Diffstat (limited to 't/TEST')
-rwxr-xr-xt/TEST2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/TEST b/t/TEST
index 945015f6b0..51b6df489c 100755
--- a/t/TEST
+++ b/t/TEST
@@ -246,6 +246,8 @@ sub _scan_test {
$testswitch = $testswitch . ',NC';
}
}
+ } elsif ($test =~ m!^\.\./lib!) {
+ $testswitch = '-I.. -MTestInit=U1'; # -T will remove . from @INC
} else {
$testswitch = '-I.. -MTestInit'; # -T will remove . from @INC
}