Subject: | Test failure reported as PASS |
Just seen while testing IO::Tee on a MSWin32 system: the test has one
test failure, but CPAN::Reporter thinks that the tests passes. See here
for a similar report (mine, which uses CPAN::Reporter 1.02, is not yet
on the cpantesters site, as it seems):
http://www.nntp.perl.org/group/perl.cpan.testers/2007/09/msg617415.html
I am not sure whose fault this is. The test file in IO::Tee does not
use any of the Test:: modules, but just does "ok" and "not ok" printing
itself. Therefore no special exit code is set (like it is done when
using Test::*), but I can't remember that setting the exit code
was required in the old days. Maybe it's ExtUtils::MakeMaker fault
because it does not run the test file through Test::Harness, as it
seems. Here a sample test rule generated by ExtUtils::MakeMaker on
a Unix system with a single test.pl file:
test_dynamic :: pure_all
PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-I$(INST_LIB)"
-I$(INST_ARCHLIB)" $(TEST_FILE)
And here the test rule when using t/*.t:
test_dynamic :: pure_all
PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e"
"test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"
$(TEST_FILES)
Only the latter seems to use the Test::Harness.
Regards,
Slaven