On Wednesday 20 August 2003 22:14, Michael G Schwern wrote:
> 1..2
> ok 1
> 1..3
> ok 1
> ok 2
> ok 3
> 3..1
> ok 2

1 problem here is that you have not indicated anywhere how many times you will 
be extending the plan so maybe there's a 

1..9
ok 1
...
ok 9

missing off the end, there's no way to tell. If you add it in then you're back 
to the global plan problem except now instead of counting tests, your 
counting extensions which may be easier but it's still non-local and it's no 
good when you want to encapsulate sets of tests in a subroutines.

> The former has the large disadvange of requiring all subtests to be aware
> of test-wide state.  And I can't think of any major advantages, though it
> is a bit more readable.

The other advantage is the ability to do

1..4
ok 1
plan 1..2
ok 2.1
ok 2.2
ok 2 # plan was ok
ok 3
ok 4

That is, extend again before you finish the current extension.

You could allow extensions at any time but then you lose the ability to know 
if you ran 4 + 2 tests or 5 + 1,

F

Reply via email to