-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
[test] Add jsontestsuite #2024
base: master
Are you sure you want to change the base?
[test] Add jsontestsuite #2024
Conversation
This is a hacky way of running nst/JSONTestSuite. It's a starting point for conversation, not something that's mergeable. Run using `python3 jsontestsuite/run_tests.py` which produces a `log.txt` and 2x html files in `results/` The original Python script assumes a particular directory structure and presence of certain files when producing results. If one library is tested, the results only show failures and implementation specific tests. (The original Python script wants to compare results between libraries.) A simple way to get more output was to run another library (e.g. Bash) to compare and one that isn't installed (e.g. Awk, which the script assumes will be in a specific directory) and will always fail.
Thanks for figuring this out! That kind of thing is why I didn't get around to it myself :-/ I have to review some PRs for Melvin tonight In the meantime, if you think the failure is a real bug (sounds like it), please file an issue on github, showing how Oils diverges from the JSON spec (and it would be interesting to see that Python/JavaScript conforms, etc.) I linked this comment in the Zulip thread, and I'm more than happy to honor it - https://lobste.rs/s/1y9hjq/regular_json#c_8tvoie |
I've written it up as #2026. |
This is excellent, thank you! Actually I changed it to use the C++ version and it found an overflow bug too ... for big positive and negative integers I am going to fix all these :) |
Hm since this found some bugs, I wonder how test_transform works ... there are fewer cases there https://github.com/nst/JSONTestSuite/tree/master/test_transform |
Hm somehow these other cases aren't automated in the original repo?
|
This is a hacky way of running nst/JSONTestSuite. It's a starting point for conversation, not something that's mergeable.
Run using
python3 jsontestsuite/run_tests.py
which produces alog.txt
and 2x html files inresults/
The original Python script assumes a particular directory structure and presence of certain files when producing results.
If one library is tested, the results only show failures and implementation specific tests. (The original Python script wants to compare results between libraries.) A simple way to get more output was to run another library (e.g. Bash) to compare and one that isn't installed (e.g. Awk, which the script assumes will be in a specific directory) and will always fail.