Skip to content

Commit 84d3c86

Browse files
committed
test numeric tokens with leading zeros are rejected
1 parent c91f7e8 commit 84d3c86

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,5 +378,16 @@
378378
{ "comment": "unrecognized op should fail",
379379
"doc": {"foo": 1},
380380
"patch": [{"op": "spam", "path": "/foo", "value": 1}],
381-
"error": "Unrecognized op 'spam'" }
381+
"error": "Unrecognized op 'spam'" },
382+
383+
{ "comment": "test with bad array number that has leading zeros",
384+
"doc": ["foo", "bar"],
385+
"patch": [{"op": "test", "path": "/00", "value": "foo"}],
386+
"error": "test op should reject the array value, it has leading zeros" },
387+
388+
{ "comment": "test with bad array number that has leading zeros",
389+
"doc": ["foo", "bar"],
390+
"patch": [{"op": "test", "path": "/01", "value": "bar"}],
391+
"error": "test op should reject the array value, it has leading zeros" }
392+
382393
]

0 commit comments

Comments
 (0)