Logo
Explore Help
Sign In
mirror/json-c
1
0
Fork 0
You've already forked json-c
mirror of https://github.com/json-c/json-c.git synced 2026-03-18 12:39:06 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
master
json-c/tests/test_json_patch.test

18 lines
312 B
Plaintext
Raw Permalink Normal View History

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 ea3af85790cb72893d0676597814b7532019c24e 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>
2021-04-20 15:47:18 +03:00
#!/bin/sh
export _JSON_C_STRERROR_ENABLE=1
# Common definitions
if test -z "$srcdir"; then
srcdir="${0%/*}"
test "$srcdir" = "$0" && srcdir=.
test -z "$srcdir" && srcdir=.
fi
. "$srcdir/test-defs.sh"
filename=$(basename "$0")
filename="${filename%.*}"
run_output_test $filename "$srcdir"
exit $?
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 35ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API 粤ICP备2023071974号-5