in reply to Re: Odd output from Test::More
in thread Odd output from Test::More

TFT Andreas,

However, there are no explicit calls to fork() in my test script ... nor the code under test ?!

The really odd thing is that until yesterday, the module wasn't working and I wasn't seeing the errors - however, since I managed to get the module to work, the errors manifested themselves ... the principle change being the adoption of the Hash::Merge module in favour of a homegrown attempt - AFAICT, the Hash::Merge module only employs recursion i.e. I don't believe it to be using fork().

Replies are listed 'Best First'.
Re^3: Odd output from Test::More
by andreas1234567 (Vicar) on Sep 27, 2007 at 12:48 UTC
    Yes, a recursive function can also produce similar results:
    $ cat 641197-2.t use strict; use warnings; use Test::More qw(no_plan); sub f { my $i = shift; print "ok $i\n"; return $i < 2 ? 1 : f($i-1) + f($i-2); } f(3); __END__ $ prove 641197-2.t 641197-2....# No tests run! 641197-2....ok 1/0Confused test output: test 2 answered after test 3 Test output counter mismatch [test 4] Test output counter mismatch [test 5] 641197-2....dubious Test returned status 255 (wstat 65280, 0xff00) FAILED--1 test script could be run, alas--no output ever seen
    --
    Andreas
      Thanx again, Andreas ,

      Your snippets clearly illustrate how it the problem might occur - the problem appears to be predicated on the code under test printing a string of the form /^(not )?ok$/ ... however, in my case, neither the code under test nor the test script prints such a string ?!

      Ever more confused ...