On 3/9/07, Andy Armstrong <[EMAIL PROTECTED]> wrote:
On 9 Mar 2007, at 13:37, Eric Hacker wrote:
> Current TAP diagnostics appear after the the test results in the
> standard TAP producers.
D'you mean messages produced with diag() ? They appear in same order
relative to the test results in the TAP as they do in the test.
Yes, but associating a particular message to the right test result
could be difficult for a TAP consumer. Time order does not provide
real result association.
Currently Test::More will say:
not ok 14 - user1 no protocol
# Failed test 'user1 no protocol'
# in ./t/TCLI.User.t at line 56.
So if a GUI TAP consumer wanted to present the associated diagnostics,
it could figure it out pretty easily. Suppose though, I had some extra
debug output in the application and was using diag to ensure TAP
compatibility, as suggested in the docs.
# 1:TCLI::User:not_authorized: for [EMAIL PROTECTED] returning 'This is not me '
not ok 17 - user2 not_auth against user1 exact
# Failed test 'user2 not_auth against user1 exact'
# in ./t/TCLI.User.t at line 149.
# 'This is not me '
# doesn't match '(?-xism:Improper protocol)'
# 1:TCLI::User:not_authorized: for [EMAIL PROTECTED] returning ''
ok 18 - user1 not_auth against user1 with resource
So which lines belong with which test result?
I know. It probably isn't hard for a human to figure it out. A TAP
consumer can only really make a best guess though.