From 260f59dc7d3e7d0ccba10599dbd0513e9e30ca3f Mon Sep 17 00:00:00 2001 From: Oliver Peate Date: Mon, 4 May 2020 08:21:15 +0100 Subject: [PATCH] Add test for deep nonexistent path Related PR - fixing an unhandled exception in a Ruby implementation of JSON patch: https://github.com/tenderlove/hana/pull/15 --- tests.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests.json b/tests.json index d8bc3eb..5c85ee7 100644 --- a/tests.json +++ b/tests.json @@ -465,6 +465,11 @@ "patch": [{"op": "remove", "path": "/baz"}], "error": "removing a nonexistent field should fail" }, + { "comment": "Removing deep nonexistent path", + "doc": {"foo" : "bar"}, + "patch": [{"op": "remove", "path": "/missing1/missing2"}], + "error": "removing a nonexistent field should fail" }, + { "comment": "Removing nonexistent index", "doc": ["foo", "bar"], "patch": [{"op": "remove", "path": "/2"}],