On 7/20/06, Andy Lester <[EMAIL PROTECTED]> wrote:

On Jul 20, 2006, at 2:19 PM, Adriano Ferreira wrote:

> was emitted, it would mean the test *should* tell the plan at the end.
> If it doesn't, it is a failure. I don't think this is no protection.
> It may be an improvement to 'no_plan' in certain circumstances.

What circumstance would that be?

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.

Think about Test::Pod::all_pod_files_ok() - when called, it plans by
computing the size of an array of files and then run individual tests.
But the files must be captured in the array, so this approach is too
expensive if you had a huge tree of sources. For similar testing
problems, processing could be done instead via an iterator like
File::Find or whatever. The array would not be built, but all sources
would be tested. The option nowadays for such solution is to have no
plan. But we may count easily and tell the plan later. That would be
handy if one believes the saying "Better late than never".

But that's just wondering and hand-waving.

Reply via email to