-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
WIP: YAML Testsuite Tester interface #798
base: v3
Are you sure you want to change the base?
Conversation
The tester interface allows generation of the internal events as text lines that match what the yaml testsuite expects. Signed-off-by: Pantelis Antoniou <[email protected]>
yaml.go
Outdated
if !e.implicit { | ||
str = "+DOC" | ||
} else { | ||
str = "+DOC---" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be a space before the ---
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, merged (in my fork that is)
Signed-off-by: Pantelis Antoniou <[email protected]>
Signed-off-by: Pantelis Antoniou <[email protected]>
Signed-off-by: Pantelis Antoniou <[email protected]>
This would be really nice to have, as we could integrate go-yaml into the test matrix: https://matrix.yaml.info/ |
str = "-DOC ..." | ||
} | ||
case yaml_MAPPING_START_EVENT: | ||
str = "+MAP" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can go-yaml differentiate between flow and block mappings here? (same question for sequences below)
@pantoniou @perlpunk Great PR! In https://github.com/amurant/go-yaml/tree/v3_next I further explored this idea and made it into a working test. Feel free to continue on that and leave a PR on that repo. not sure if we will be able to merge it back into this repo, since there seems to be no merge-activity here anymore ... |
@inteon Interesting. I will take a look. FWIW I've started work in a complete golang binding of my library libfyaml https://github.com/pantoniou/go-fyaml Note that it's not nearly complete yet, but I intent to get it to a point where it's complete enough to work for most usage cases. I would appreciate it if you could take a look. |
Implement a rudimentary Tester interface that allows generation
of YAML testsuite textual representation of an internal event.
Please see: https://github.com/yaml/yaml-test-suite