[960] Fault unknown TAP tokens in strict mode (V13+)
Andy Armstrong
andy at hexten.net
Sun Feb 17 16:15:33 UTC 2008
On 16 Feb 2008, at 17:43, Michael G Schwern wrote:
>> +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.
OK. It's TAP 13 which was intended to be stricter. TAP 12 is unaffected.
> 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.
I guess we could say that a TAP version N parser will be non-strict
when it sees TAP version N+M
> 2) It allows one to test things that print to STDOUT.
Yup. Hmm. Dunno. That's always struck me as kinda dangerous :)
> Making it dependent on the version helps with #1, I think. I'd need
> some
> convincing this isn't backing us into a corner.
Sure. Well I'm not convinced either.
> 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.
I quite like the idea of having to explicitly declare your test as
stdout-dirty.
--
Andy Armstrong, Hexten
More information about the tapx-dev
mailing list