On 7/20/06, Andy Lester <[EMAIL PROTECTED]> wrote:
On Jul 20, 2006, at 2:45 PM, Adriano Ferreira wrote: > Ok, that's weird. But it may occasionally have usefulness. Gabor > started the thread with the idea of having a test against web pages, > which he doesn't know how many at the beginning, but which may be > verified at the end - his count against Test::Builder count. But that's not much verification, is it? If you're not going to know the number of tests ahead of time, then use no_plan.
You might be right that counting yourself and comparing does not give you much. 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. That's what I wanted to avoid. So maybe if there was a mode where Test::Builder did not automatically print its counting but would wait for a call such as hey_finished_all_tests(). So this example that using no_plan wold succeed will actually fail. use Test::More 'no_plan_but_wait'; ok(1); exit; ok(1); hey_finished_all_tests(); Gabor