On 7/21/06, Michael G Schwern <[EMAIL PROTECTED]> wrote:
On 7/20/06, Gabor Szabo <[EMAIL PROTECTED]> wrote:
> If I am not mistaken the problem with no_plan is that the test script
> might exit before actually running all the tests you wanted and Harness
> won't notice it.
PS In all my years of testing I have never been bitten by this in the
real world which is why I've never bothered to code up a solution.
Anyone else?
real world? I am not from there.
When debugging (either the test or the real app) I ocassionally add
exit() to the middle of my test code.
It might be a bad practice in itself but then I sometimes forget to
remove it. Having 'no_plan' I might never notice it.
I guess I could change my practice to add exit(1) so the test would still
fail but in practice I add the exit() mostly when my test script dies in the
middle and I try to figure out where does it die. So an exit(1) would
just further
confuse me. (still thinking aloud, the tests_finished() call would not
improve here).
Besides, the fact that you were not biten by this does not mean that other
creative people - who are less vocal on this list if they know about it at all -
could not come up with something.
Maybe if someone called exit() within a module being tested?
That would fool 'no_plan' mode but not 'wait_for_tests_finished' mode)
Gabor