-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
List like [[":,"]] is not parsed properly #56
Comments
To be clear, here's my {
"name": "testyaml",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@types/node": "^10.12.12",
"deep-equal": "^1.0.1",
"fast-check": "^1.8.1",
"typescript": "^3.2.2",
"yaml": "^1.0.3"
}
} When source saved to
|
Thank you for finding this! This was a bug in the parser, which was not properly checking the flow-in/flow-out context when parsing plain values that start with |
@rix0rrr @eemeli |
@dubzzz Sure, do send in a PR: The test looks pretty good, and appears not to take too long to run. Presumably the inputs will vary between runs? As a small stylistic fix, the |
Indeed the inputs will vary from one run to another. In case of failure, the aim of such technic is to give you the minimal failing case and not horrible objects with thousands entries. So you might expect to have very clear and simple corner case to investigate if it happens to find an issue in the future. |
I wrote a property-based check for the
yaml
library using fast-check (https://github.com/dubzzz/fast-check) and it uncovered the following error:I don't think this issue will impact us anytime soon, but you might want to be aware of it.
Here's my code (TypeScript) if you want to experiment more. Right now it will trigger mostly on the
[[":,"]]
bug and so will not make a lot of progress. I can only continue testing once that bug is fixed.The text was updated successfully, but these errors were encountered: