-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pragmas #6
Comments
+1 definitely this is worth having. I would like to have another that causes the parser to trigger a fatal exception on first error also. Combined with strict this would stop parsing after the first unknown character. |
I didn't know it existed :D my +1 |
I haven't seen anything actually use it and it's not documented either: it's barely existent really. |
I think this mostly answers #4 which is a benefit actually. |
The format currently used seems to be
Which is sensible enough to me. |
Yeah, I was about to say just that in that ticket. |
It does however strike me as something that the caller of the c would like to enable over it coming out of the TAP itself - I think we should account for this in that the caller and consumers can override. Also mentioned in #4 is how the call order happens, should the pragma only be at the top of the document or are these flags able to be used like this:
I would prefer that the pragmas are resolved before the parsing happens for ease of use however I think the question is worth resolving now. |
I agree. It's easier to allow it later if there's ever a need. |
@beatgammit I'm not sure it it would be easy to add it in later without breaking a lot of consumers. I am however fairly certain it is hard to see a use for it. |
I guess I was more thinking of processing old output, not generating new output. But you're right, it would be easier to go the otherway (allow it everywhere, later restrict it). |
@Leont so if I am right unknown lines streamed through the TAP parser with the strict parser get converted into errors? Sorry I'm not seeing the functionality immediately from the code itself. |
node-tap only supports |
Perl 5's TAP parser contains a mechanism called pragmas in its TAP13 mode. This basically means that the stream can subtly change some aspects of how it is parsed. The only supported pragma is strict, which causes any unknown lines to be parse errors.
This may be a useful mechanism to standardize.
The text was updated successfully, but these errors were encountered: