The changes to t/test.pl appear to be real bugs.
This allows `make test_harness` to run, but many tests will still
fail under -Dusedefaultstrict
This addresses #21732 but does not fix it. I'm unsure how
supported that build option is.
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.
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.
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.
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}.
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.
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.
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.
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 '.'