diff --git a/test/unittest/schematest.cpp b/test/unittest/schematest.cpp index 4ceacd6..ff8b5d6 100644 --- a/test/unittest/schematest.cpp +++ b/test/unittest/schematest.cpp @@ -960,6 +960,19 @@ TEST(SchemaValidator, AllOf_Nested) { INVALIDATE(s, "123", "", "allOf", ""); } +TEST(SchemaValidator, EscapedPointer) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\": {" + " \"~/\": { \"type\": \"number\" }" + " }" + "}"); + SchemaDocument s(sd); + INVALIDATE(s, "{\"~/\":true}", "/properties/~0~1", "type", "/~0~1"); +} + template static char* ReadFile(const char* filename, Allocator& allocator) { const char *paths[] = {