[960] Fault unknown TAP tokens in strict mode (V13+)

Michael G Schwern schwern at pobox.com
Sat Feb 16 17:43:14 UTC 2008


andy at hexten.net wrote:
> +=head3 C<strict_mode>
> +
> +Returns true if the parser is operating in strict mode. Strict parsing
> +is enabled when a TAP version number > 12 is seen. In strict mode the
> +parser will flag parse errors for any unknown TAP tokens.

Whoa there!  That's a major change.  We should talk about it.

Historically, a TAP parser should ignore any unknown output for two reasons:

1) It allows old parsers to still understand a subset of new TAP.
2) It allows one to test things that print to STDOUT.

Making it dependent on the version helps with #1, I think.  I'd need some 
convincing this isn't backing us into a corner.

It doesn't solve #2.  One often doesn't have control over the code they're 
testing, so it makes that impossible.

At minimum I'd bump the TAP version #.  And there needs to be a way to shut it 
off.  Problem is, the test itself knows best whether there's going to be 
garbage on STDOUT.  So the control would lie in the test.


-- 
Look at me talking when there's science to do.
When I look out there it makes me glad I'm not you.
I've experiments to be run.
There is research to be done
On the people who are still alive.
     -- Jonathan Coulton, "Still Alive"


More information about the tapx-dev mailing list