mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Squashed 'tests/json-patch-tests/' changes from 716417e..5405313
5405313 Add tests for replacing the root document (#30) git-subtree-dir: tests/json-patch-tests git-subtree-split: 54053131a31241ecccfffdc79753ff169aa9763c
This commit is contained in:
parent
7276f4df05
commit
48b3909946
15
tests.json
15
tests.json
@ -55,6 +55,21 @@
|
||||
"expected": "bar",
|
||||
"disabled": true },
|
||||
|
||||
{ "comment": "replace object document with array document?",
|
||||
"doc": {},
|
||||
"patch": [{"op": "add", "path": "", "value": []}],
|
||||
"expected": [] },
|
||||
|
||||
{ "comment": "replace array document with object document?",
|
||||
"doc": [],
|
||||
"patch": [{"op": "add", "path": "", "value": {}}],
|
||||
"expected": {} },
|
||||
|
||||
{ "comment": "append to root array document?",
|
||||
"doc": [],
|
||||
"patch": [{"op": "add", "path": "/-", "value": "hi"}],
|
||||
"expected": ["hi"] },
|
||||
|
||||
{ "comment": "Add, / target",
|
||||
"doc": {},
|
||||
"patch": [ {"op": "add", "path": "/", "value":1 } ],
|
||||
|
Loading…
Reference in New Issue
Block a user