Skip to content

Commit 1233257

Browse files
committed
add test case from pull request description
1 parent d62e138 commit 1233257

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ def test_trailing_escape(self):
216216
def test_invalid_escape(self):
217217
self.assertRaises(JsonPointerException, JsonPointer, '/foo/bar~2')
218218

219+
def test_leading_zero(self):
220+
doc = [0, 1, 2]
221+
self.assertRaises(JsonPointerException, resolve_pointer, doc, '/01')
219222

220223
class ToLastTests(unittest.TestCase):
221224

0 commit comments

Comments
 (0)