Skip to content
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

Open
wants to merge 4 commits into
base: v3
Choose a base branch
from

Conversation

pantoniou
Copy link

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

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---"

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 ---?

Copy link
Author

@pantoniou pantoniou Nov 30, 2021

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)

yaml.go Outdated Show resolved Hide resolved
@perlpunk
Copy link

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"

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)

@inteon
Copy link

inteon commented Feb 18, 2022

@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 ...

@pantoniou
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants