Ovid wrote: >>> How do you mark that as a TODO test? >>> >>> not ok 2 # TODO don't know what $foo is #--- >>> >>> Anyone see a problem with that? >> not ok 2 #--- >> line: 17 >> code: ok $foo; >> directive: TODO >> reason: don't know what $foo is >> ... >> >> Although that loses compatibility with older parsers in that you >> can't mark a test as TODO both ways. > > I remember when I mentioned marking 'passing TODO tests as failures' > and you objected to me breaking the tool chain. I finally realized > (I'm slow) you were right and dropped that idea. With your suggestion, > if someone has a new TAP producer and and old TAP consumer, this could > break the toolchain, too, since the TODO test would be considered a > failure when it's not.
Yep, we've got a problem. One way around this is to use the same trick as I proposed here http://www.nntp.perl.org/group/perl.qa/2007/03/msg8346.html and avoid the new producer / old parser situation from happening. Let's leave that as a fallback position and see about fixing the syntax. I chose #--- because 1) its backwards compatible as long as you ignore unknown directives and 2) it allows TAP to stream. Otherwise its pretty damn inelegant. We could say that a name ending in --- indicates a forthcoming TAP stream... not ok 2 - the most important test in the world --- # TODO because I said so name: the most important test in the world line: 17 directive: TODO reason: because I said so ... It means old parsers think there's a --- on the end of the name, but Test::Harness doesn't do much with the test name so its not a big deal. Or someone can make a convincing argument that the streaming case isn't that important and we can just put the --- on the next line.