summaryrefslogtreecommitdiff
path: root/TestInit.pm
Commit message (Collapse)AuthorAgeFilesLines
* Mailling list archaeology, restoring old contentMax Maischein2019-10-111-1/+2
| | | | | | | | | http://xray.mpe.mpg.de does not serve the mailing list archives anymore and is not available via the Wayback machine either. This patch restores the content of a link to an URL "we" hopefully control better. The message ID correlates to a patch that git blame identified as being replaced by the current state in the time range.
* more places where -I. for -MTestInit is neededSlaven Rezic2018-09-131-1/+1
|
* stop passing '.' in @INC to testsDavid Mitchell2017-04-071-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently TestInit.pm adds '.' to @INC (except if running under taint). Since *all* tests run from the perl core are invoked as perl -MTestInit[=arg,arg,..] some/test.t this means that all test scripts (including those under cpan/ etc) are excuted with dot present, regardless of the settings of $PERL_USE_UNSAFE_INC and -Ddefault_inc_excludes_dot. This commit changes it so that: 1) TestInit.pm transparently passes though a trailing dot in @INC if present (so it now honours $PERL_USE_UNSAFE_INC and -Ddefault_inc_excludes_dot) 2) Adds a 'DOT' arg (e.g. -MTestInit=DOT) which unconditionally adds '.'; 3) Updates t/TEST so that it (and t/harness which requires t/TEST) have a whitelist of cpan/ modules which need '.'; test scripts for these are invoked with -MTestInit=DOT. 4) Removes the $PERL_USE_UNSAFE_INC unsetting in t/TEST and t/harness; now that environmant variable is passed unchanged to all perl processes involved in running the test suite. As of this commit, lots of tests will fail on a dotless perl build; the next few commits will fix up any tests scripts and non cpan/ distributions which relied on dot being present.
* Patch unit tests to explicitly insert "." into @INC when needed.H.Merijn Brand2016-11-111-1/+1
| | | | | require calls now require ./ to be prepended to the file since . is no longer guaranteed to be in @INC.
* Get closure.t working under minitestFather Chrysostomos2014-09-021-1/+10
| | | | | | | 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.
* Two small tidying refactors for TestInit.pmNicholas Clark2011-06-221-2/+3
| | | | | | Make the order of backslash and forward slash in character classes consistent. Move the top level modification of $0 adjacent to the top level modification of $ENV{PERL_CORE}.
* Fix a (back)slash bug in a regex, added with the regex itself.Nicholas Clark2011-06-221-1/+1
| | | | | | | | | 8fcfece7bab67639 added code to TestInit to set the CWD and @INC for tests in ext. However, the regex used to distinguish where a test was had one forward slash where a backslash should have been, hence the intended Win32 support would not work. I'm assuming that no-one has noticed this because no-one has tried to run tests from the command line on Win32 directly, or if they have they always use forward slashes in their pathnames.
* In TestInit, eliminate @new_inc, by assigning to @INC directly.Nicholas Clark2011-06-221-15/+11
| | | | | | To decide whether to default, we can test $set_opt instead of whether @new_inc is empty, as all places that assign to @new_inc (now to @INC) also set $set_opt.
* In TestInit, inline new_inc() and set_opt() into import(), their only caller.Nicholas Clark2011-06-221-29/+20
|
* Add an import option 'T' to TestInit, for tests that run at the top level.Nicholas Clark2011-06-221-0/+5
| | | | | 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].
* In TestInit.pm, move the default chdir and @INC code into import().Nicholas Clark2011-06-221-28/+36
| | | | | | The behaviour is consistent with previous behaviour, as the equivalent of the new code used to be run at the top level, hence would happen (unconditionally) before import() was called.
* In TestInit.pm, merge two substitutions into one.Nicholas Clark2011-06-221-3/+2
| | | | | Both are intended to transform ./perl into ../../perl, one for forward slashes, one for backslashes.
* When running tests from lib/, set @INC and $ENV{PERL5LIB} to ../libNicholas Clark2011-02-071-1/+4
| | | | | | 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 '.'
* Support building extensions in dist/ as well as cpan/ and ext/Nicholas Clark2009-09-261-1/+1
|
* TestInit at the command line should treat tests in cpan/ the same as in ext/Nicholas Clark2009-09-261-1/+1
|
* Anchor a regexp, else paths including /Text/ are mistaken for tests in ext/Nicholas Clark2009-08-311-1/+1
|
* Correctly munge the path of $^X when running interactively, and set PERL5LIB.Nicholas Clark2009-08-301-2/+3
|
* Move TestInit.pm to the top level of the distribution, to make it easier to use.Nicholas Clark2009-08-301-0/+111