David E. Wheeler wrote:
> 1..4? God no. I think this:
> 
>  # Planning 2 more tests at foo.t line 3.
>  ok 1 - First test
>  # Looks like you planned 2 tests, but only 1 was run
>  # at foo.t line 6.
>  ok 3 - Second test
>  ok 4 - Third test
>  1..3
> 
> That is, all tests should pass, but the test suite itself should fail,
> just as happens now if you have the wrong number of tests. Not sure how
> you'd show that, though.

Ok, makes sense.  Now riddle me this, Batman:

use Test::More;

plan add => 1;
pass("first");
pass("second");
plan add => 2;
pass("third");
done_testing(3);

Is that...

ok 1 - first
ok 2 - second
# Looks like you planned 1 tests, but 2 were run
#   at foo.t line 3.
ok 2 - third
# Looks like you planned 2 tests, but only 1 was run
#   at foo.t line 6.
1..3

One of the issues with that approach is Test::Builder's history can't store
test #2 twice.  So history is lost.


-- 
There will be snacks.

Reply via email to