aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_jsonpointer_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/util_jsonpointer_spec.lua')
-rw-r--r--spec/util_jsonpointer_spec.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/util_jsonpointer_spec.lua b/spec/util_jsonpointer_spec.lua
index ce07c7a1..75122296 100644
--- a/spec/util_jsonpointer_spec.lua
+++ b/spec/util_jsonpointer_spec.lua
@@ -21,9 +21,11 @@ describe("util.jsonpointer", function()
}]])
end)
it("works", function()
+ assert.is_nil(jp.resolve("string", "/string"))
assert.same(example, jp.resolve(example, ""));
assert.same({ "bar", "baz" }, jp.resolve(example, "/foo"));
assert.same("bar", jp.resolve(example, "/foo/0"));
+ assert.same(nil, jp.resolve(example, "/foo/-"));
assert.same(0, jp.resolve(example, "/"));
assert.same(1, jp.resolve(example, "/a~1b"));
assert.same(2, jp.resolve(example, "/c%d"));