summaryrefslogtreecommitdiff
path: root/TestInit.pm
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-31 22:29:27 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-02 20:11:14 -0700
commite1498de268ad7068b3be09dad683985a67e3ad93 (patch)
treeb2677ee643cbd8b09e5d63b8ec5ae5a1d6e25738 /TestInit.pm
parenta24e7b321c56e21bd00aa970308e59c69a8c3886 (diff)
downloadperl-e1498de268ad7068b3be09dad683985a67e3ad93.tar.gz
Get closure.t working under minitest
minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. Also, we need to make sure that, when run from TEST, we do actually include buildcustomize.pl.
Diffstat (limited to 'TestInit.pm')
-rw-r--r--TestInit.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/TestInit.pm b/TestInit.pm
index 16eb318cc3..f4ed6fd93d 100644
--- a/TestInit.pm
+++ b/TestInit.pm
@@ -76,7 +76,16 @@ sub import {
} else {
# (likely) we're being run by t/TEST or t/harness, and we're a test
# in t/
- @INC = '../lib';
+ if (defined &DynaLoader::boot_DynaLoader) {
+ @INC = '../lib';
+ }
+ else {
+ # miniperl/minitest
+ # t/TEST does not supply -I../lib, so buildcustomize.pl is
+ # not automatically included.
+ unshift @INC, '../lib';
+ do "../lib/buildcustomize.pl";
+ }
}
}