----- Original Message ---- > From: Jonathan Rockway <[EMAIL PROTECTED]>
> > I think we really need to reach a decision on > > > > http://testanything.org/wiki/index.php/Test_Groups versus > > http://testanything.org/wiki/index.php/Test_Blocks > > It looks like the con on both of these proposals is lack of backcompat. No. They're actually both completely backwards compatible. Consider test groups: 1..3 ok 1 1..2 2 a block 1..3 2.1 another block ok 2.1.1 ok 2.1.2 ok 2.1.3 ok 2.1 # end of another block ok 2.2 ok 2 # end of a block 1..3 3 a third block ok 3.1 ok 3.2 not ok 3 # end of a third block, planned for 3 but only ran 2 tests Since older TAP parsers are required to ignore lines which don't recognize the grammar, here's what the parser should see: 1..3 ok 1 ok 2 # end of a block not ok 3 # end of a third block, planned for 3 but only ran 2 tests And with test blocks (the version on the Wiki is different and incorrect. I've fixed it below, but not yet on the wiki): TAP version 14 1..4 ok 1 - testing begin 1 Object creation 1..2 ok 1 Object created OK ok 2 Object isa Flunge::Twizzler end 1 Object creation ok 2 Clone OK begin 3 Methods 1..4 ok 1 has twizzle method ok 2 has burnish method ok 3 has spangle method not ok 4 has frob method end 3 Methods ok 3 another test ok 4 Resources releasedHere's what an older TAP parser will see: 1..4 ok 1 - testing ok 2 Clone OK ok 3 another test ok 4 Resources released So if your current TAP parser is correct, you shouldn't have a problem. The "breaks backwards compatibility" arguments on the wiki don't seem correct. > # PLAN 4 BLOCKS > # {BLOCK 1} 1..2 > ok 1 - BLOCK{1} TEST{1} - and the usual comment > ok 2 - BLOCK{1} TEST{2} > # {BLOCK 2} PLAN NO_PLAN > ok 3 - BLOCK{2} TEST{1} > # {BLOCK 2} 1..1 > # {BLOCK 3} 1..1 This has much of the same problem as the current 'test groups' proposal: it's ugly and hard to read. However, it seems even harder to read than test groups. TAP should be as terse as possible, and no terser, in order to unequivocally represent intent. Otherwise, why not just switch to XML? Sorry to be so blunt :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Perl and CGI - http://users.easystreet.com/ovid/cgi_course/ Personal blog - http://publius-ovidius.livejournal.com/ Tech blog - http://use.perl.org/~Ovid/journal/