Skip to content

Commit e1a036e

Browse files
committed
Correct A.14; add A.15 and A.16.
1 parent 516feba commit e1a036e

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

spec_tests.json

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
},
178178

179179
{
180-
"comment": "Invalid JSON Patch Document",
180+
"comment": "A.13 Invalid JSON Patch Document",
181181
"doc": {
182182
"foo": "bar"
183183
},
@@ -188,16 +188,37 @@
188188
},
189189

190190
{
191-
"comment": "~ Escape Ordering",
191+
"comment": "A.14. ~ Escape Ordering",
192192
"doc": {
193193
"/": 9,
194-
"~1": 10
194+
"~1": 10
195195
},
196-
"patch": [{"op": "test", "path": "/~01", "value":"10"}],
196+
"patch": [{"op": "test", "path": "/~01", "value": 10}],
197197
"expected": {
198198
"/": 9,
199199
"~1": 10
200200
}
201+
},
202+
203+
{
204+
"comment": "A.15. Comparing Strings and Numbers",
205+
"doc": {
206+
"/": 9,
207+
"~1": 10
208+
},
209+
"patch": [{"op": "test", "path": "/~01", "value": "10"}],
210+
"error": "number is not equal to string"
211+
},
212+
213+
{
214+
"comment": "A.16. Adding an Array Value",
215+
"doc": {
216+
"foo": ["bar"]
217+
},
218+
"patch": [{ "op": "add", "path": "/foo/-", "value": ["abc", "def"] }],
219+
"expected": {
220+
"foo": ["bar", ["abc", "def"]]
221+
}
201222
}
202-
223+
203224
]

0 commit comments

Comments
 (0)