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

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

Replies are listed 'Best First'.
Re^4: Odd output from Test::More
by Bloodnok (Vicar) on Sep 27, 2007 at 15:17 UTC
    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 ...