Alexandru Ardelean
|
3b8363fcdc
|
tests: test_json_patch: add test suite for JSON patch
Essentially, this change adds the test cases from this repo:
https://github.com/json-patch/json-patch-tests
Specifically:
https://github.com/json-patch/json-patch-tests/blob/master/spec_tests.json
https://github.com/json-patch/json-patch-tests/blob/master/tests.json
The files were taken at the date of this commit, at git hash
ea3af85790
Some tests may not have an 'expected' or 'error' field. Those are ignored.
One test was disabled manually via "disabled_in_json_c", because it tries
an impossible test, i.e. to add 2 "op" fields in the same patch entry,
something which is impossible in a JSON object.
For the 'error' cases, right now we only test that an error happens.
Later, we can extend this to check the error codes.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
|
4 years ago |