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.
} 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";
+ }
}
}
BEGIN {
chdir 't' if -d 't';
- @INC = '../lib';
require './test.pl';
+ @INC = () unless is_miniperl();
+ unshift @INC, '../lib';
}
use Config;