Skip to content

Commit da35d88

Browse files
committed
[245] Add test for negative prefix in relative-json-pointer
Affects drafts 2019-09 and 07.
1 parent d17e1ba commit da35d88

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/draft2019-09/optional/format/relative-json-pointer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"valid": true
1010
},
1111
{
12-
"description": "a valid downwards RJP",
12+
"description": "a valid downwards RJP",
1313
"data": "0/foo/bar",
1414
"valid": true
1515
},
@@ -27,6 +27,11 @@
2727
"description": "an invalid RJP that is a valid JSON Pointer",
2828
"data": "/foo/bar",
2929
"valid": false
30+
},
31+
{
32+
"description": "negative prefix",
33+
"data": "-1/foo/bar",
34+
"valid": false
3035
}
3136
]
3237
}

tests/draft7/optional/format/relative-json-pointer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"valid": true
1010
},
1111
{
12-
"description": "a valid downwards RJP",
12+
"description": "a valid downwards RJP",
1313
"data": "0/foo/bar",
1414
"valid": true
1515
},
@@ -27,6 +27,11 @@
2727
"description": "an invalid RJP that is a valid JSON Pointer",
2828
"data": "/foo/bar",
2929
"valid": false
30+
},
31+
{
32+
"description": "negative prefix",
33+
"data": "-1/foo/bar",
34+
"valid": false
3035
}
3136
]
3237
}

0 commit comments

Comments
 (0)