--- Michael G Schwern <[EMAIL PROTECTED]> wrote:

> 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.

That's still pretty ad-hoc and breaks as soon as we encounter:

  is $delimiter, $dashes,
    '... we should have the correct delimiter:   ---';

And give that I and many others being our "dependent" test names with
"...", I could easily see a big chunk of TAP getting swallowed and
people getting extremely confused.

Indent the YAML and put it on the next line:

  not ok 2 'some name' # TODO or not TODO
    ---
    some: YAML
    ...

Sure, we could have things hang at some point in there, as you pointed
out, but the TAP reader, from that single line of TAP, would still have
enough info to say whether or not the test failed.  Even if it hangs
prior to displaying diagnostics, the programmer at least can see the
test name and number and be able to take appropriate action.

Cheers,
Ovid

--

Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/

Reply via email to