![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re^3: Test::Harness bug ? ... or author idiocy ?by hippo (Bishop) |
on Nov 06, 2021 at 12:04 UTC ( #11138498=note: print w/replies, xml ) | Need Help?? |
Thanks for this example. I have run your code with the printf uncommented and reproduced your findings (on Linux) but only on some runs. The result is inconsistent. Here is the output from 2 runs within a few seconds of each other:
However, upon inspection the problem is not with TAP::Harness. The output of just running the script shows that the plan can appear in the middle of your data. Again, running a few times gives:
So this looks to be a buffering issue. If I simply modify your code to include $|++; before the plan is printed then the script runs fine, the plan is printed at the top and the test harness has no complaints. Not a bug in Test::Harness after all. 🦛
In Section
Seekers of Perl Wisdom
|
|