On 1 Jul 2006, at 23:38, Michael G Schwern wrote:
Cons?
* Doesn't handle nested groups - but I have to admit that's a use
case I've never wanted :-)
* Doesn't handle groups with an undefined number of tests. The
obvious solution would be to allow ".." sans numeric suffix so you
would have something like
..2 - I want to run two tests
ok 1
ok 2
.. - I don't know how many tests in this group
ok 3
ok 4
ok 5
ok 6
..1 - one last test
ok 7
1..7
* since there is no "end of group" marker you get problems when
mixing grouped and non-grouped tests together. Let's pretend
Test::Block output TAP with this format.
use Test::More 'no_plan';
use Test::Block qw( $Plan );
{
local $Plan = 2;
pass 'first test';
# oops - forgot second test
}
pass 'non-grouped test';
gives us
..2
ok 1 - first test
ok 2 - non-grouped test
1..2
which misses the fact the second test isn't intended to be part of
the group. This is nasty enough to need fixing IMO.
* Another use case that this doesn't support is having the output
from different test groups interleaved. This is something that I
would have found useful on the occasions that I've built test farms
that collate the TAP output from different machines together. Rather
than wait for each to finish and output everything together it would
be nice to be able to do something like:
ok 1.1 - first result from first group
ok 2.1 - first result from second group
ok 2.2 - second result from second group
ok 1.2 - second result from first group
Although this could also be handled by a test runner that was bright
enough to read multiple streams at the same time - which might be a
better solution than making TAP more complex now that I think of it...
Cheers,
Adrian