This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b680092
)
Add an import option 'T' to TestInit, for tests that run at the top level.
author
Nicholas Clark
<nick@ccl4.org>
Sun, 19 Jun 2011 17:39:07 +0000
(19:39 +0200)
committer
Nicholas Clark
<nick@ccl4.org>
Wed, 22 Jun 2011 20:41:13 +0000
(22:41 +0200)
This sets @INC to 'lib, and unless we're already at the top level will
chdir '..' [on the assumption that we are starting in t].
TestInit.pm
patch
|
blob
|
blame
|
history
diff --git
a/TestInit.pm
b/TestInit.pm
index
88c3ba1
..
c921686
100644
(file)
--- a/
TestInit.pm
+++ b/
TestInit.pm
@@
-69,6
+69,11
@@
sub import {
delete $ENV{PERL_CORE}
} elsif ($_ eq 'A') {
$abs = 1;
+ } elsif ($_ eq 'T') {
+ $chdir = '..'
+ unless -f 't/TEST' && -f 'MANIFEST' && -d 'lib' && -d 'ext';
+ @new_inc = 'lib';
+ $setopt = 1;
} else {
die "Unknown option '$_'";
}