On 8 Aug 2006, at 20:06, chromatic wrote:

On Tuesday 08 August 2006 00:30, [EMAIL PROTECTED] wrote:

Following in the footsteps of the recent discussion on extending no_plan
to cover the case of us making sure the script actually finished
'normally', it occurred to me that another thing that might be useful is a means to have Test::Harness(? - I could be wrong) update the plan in
the scripts it just ran.

Why bother? If you're going to assume that the number of tests is correct
without looking at it, why do you need a plan anyway?

Because sometimes you might want to mix chunks of "assuming the # tests is correct" and "knowing the # of tests"?

[snip]
This has *never* been a burden for me and it has saved me from checking in
broken code several times.

Do I work very differently from everyone else?

Maybe. To be honest I can only ever recall two occasions where a plan with a fixed # of tests has actually caught a bug. Both of those would have been caught if Test::Harness detected the lack of a 1..N footer. If T::H caught this case, I'd probably move to no_plan throughout.

I guess the use case for a fixed plan saving me would be something like 'accidentally deleting test while editing' - but this is something that doesn't really seem to happen to me.

Can you give some examples where it's saved you?

(genuinely interested :-)

Adrian

Reply via email to