Closed dakkar closed 1 year ago
turns out that the source of the problem was the line my @switches = grep { m/\S/ } split /\s+/, $1 if defined $1
in TestFile.pm
, which caused the @switches
array to be shared between invocations of the sub, thus leaking between test files
nice state variable for free :-)
Given these two small test files:
a.t
:b.t
:and yath from Test2::Harness 1.000150, this happens:
yath test a.t
passesyath test b.t
passesyath test a.t b.t
passesyath test b.t a.t
failsrunning verbosely, I can see that, only in the last case,
b.t
is run underperl -w
(a.t
is always run underperl -w
, as expected)removing the shebang from
b.t
makes the problem disappear.-j1
/-j2
doesn't make any difference, nor does running under a persistent runner.