-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
YAML 1.2 compatibility tests #16
Comments
Yep this exists: I had thought to suggest this as well! (and add |
Hello @kubkon and @adamserafini , I needed a YAML parser so I checked this out and found these issues and went down a rabbit hole. Fixed up the parser so it runs with 0.11.0-dev.1026+4172c2916 I have now added some work to the build.zig which checks for the existence of the 'data' folder that is generated via the yaml-test-suite inside the 'test' folder. If it finds this, it then auto generates a file full of tests that look like this
Essentially just checking if we can load the YAML file without it crashing. This is all I have achieved so far, currently it sits at Feel free to check my WIP at |
Very cool work @Bergasms! Wanna create a PR and upstream your work? I will happy to code review your changes. One thing that I would suggest based on the snippet you posted is for the generator to emit something like: test "indent/DK95/08" {
var yaml = loadFromFile("test/data/tags/indent/DK95/08/in.yaml") catch return error.Failed; // Or even hone in on the error if desired
defer yaml.deinit();
}
test "indent/DK95/01" {
var yaml = loadFromFile("test/data/tags/indent/DK95/01/in.yaml") catch return; // Error is success so just return
defer yaml.deinit();
return error.UnexpectedSuccess;
} |
@kubkon Yes I will, I've been self teaching zig and failing forward, so to speak, so it will be good to have some guidance. I'll do a bit more to get it into a less 'hacked together' state and then put up a PR, when time permits. |
It would be very cool if we subjected the parser to a YAML 1.2 compatibility tests (if such even exist).
The text was updated successfully, but these errors were encountered: