Skip to content

Commit 2663031

Browse files
committed
Test for copying null-value key.
1 parent c235ce8 commit 2663031

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

patch_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ var Cases = []Case{
186186
`[{"op": "copy", "path": "/foo/0", "from": "/foo"}]`,
187187
`{ "foo": [["bar"], "bar"]}`,
188188
},
189+
{
190+
`{ "foo": null}`,
191+
`[{"op": "copy", "path": "/bar", "from": "/foo"}]`,
192+
`{ "foo": null, "bar": null}`,
193+
},
189194
{
190195
`{ "foo": ["bar","qux","baz"]}`,
191196
`[ { "op": "remove", "path": "/foo/-2"}]`,

0 commit comments

Comments
 (0)