On Feb 18, 2009, at 2:44 PM, Michael G Schwern wrote:
Sending comments to STDOUT has been the standard way of hiding
comments from
the user for a long time. If we started displaying them by default,
suddenly
silently passing tests would start spewing all sorts of random junk
violating
the axiom that passing tests should be quiet.
The thing which most takes advantage of this is TODO tests. They
send their
failure diagnostics to STDOUT so the user is not spammed with
passing test
information.
Fair enough.
That said, a "show me the comments" switch for TAP::Parser would be
handy.
Yes, absolutely. I've already had this as a feature request for
pg_prove.
The real underlying problem is, as far as TAP is concerned, there
are no
"failure diagnostics" there are just free form comments. It can't
tell what
comment is part of a failure and what comment is additional
information and
what comment is just a comment.
As far as I'm concerned, it can include both.
Formalized diagnostics solve the problem of allowing structured
diagnostics
associated with a test, but they don't solve the more general
problem of how
to display informative, free-form output to the user.
One proposed solution is the TAP logging syntax, but it wasn't
discussed at
the TAP summit in Oslo last year. It's status is in limbo.
http://testanything.org/wiki/index.php/TAP_logging_syntax
As a way of dealing with the immediate need, I'd love to see a way to
just tell TAP::Harness to emit all diagnostics, whether failure
diagnostics or freeform output, as you say. It should be off by
default, as you pointed out in the first two paragraphs, but I'd turn
it on by default for pg_prove.
Thanks,
David