File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ [
2
+ { "comment" : " empty list, empty docs" ,
3
+ "doc" : {},
4
+ "patch" : [],
5
+ "expected" : {} },
6
+
7
+ { "comment" : " basic simplexml promotion" ,
8
+ "doc" : { "foo" :1 },
9
+ "patch" : [ {"add" :" /foo/1" , "value" :2 } ],
10
+ "expected" : { "foo" :[1 , 2 ] } },
11
+
12
+ { "comment" : " Add 1-length array is equivalent to scalar add" ,
13
+ "doc" : { },
14
+ "patch" : [ {"add" :" /foo/0" , "value" :1 } ],
15
+ "expected" : { "foo" :1 } },
16
+
17
+ { "comment" : " replace as array" ,
18
+ "doc" : { "foo" :1 },
19
+ "patch" : [ {"replace" :" /foo/0" , "value" :2 } ],
20
+ "expected" : { "foo" :2 } },
21
+
22
+ { "comment" : " remove penultimate demotes to singleton" ,
23
+ "doc" : { "foo" :[1 , 2 ] },
24
+ "patch" : [ {"remove" :" /foo/1" } ],
25
+ "expected" : { "foo" :1 } },
26
+
27
+ { "comment" : " tests complete" }
28
+ ]
You can’t perform that action at this time.
0 commit comments