Skip to content

Commit aa68c84

Browse files
authored
Merge pull request #27 from darrenjs/master
test numeric tokens with leading zeros are rejected
2 parents 269f54b + 84d3c86 commit aa68c84

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
@@ -383,5 +383,16 @@
383383
{ "comment": "unrecognized op should fail",
384384
"doc": {"foo": 1},
385385
"patch": [{"op": "spam", "path": "/foo", "value": 1}],
386-
"error": "Unrecognized op 'spam'" }
386+
"error": "Unrecognized op 'spam'" },
387+
388+
{ "comment": "test with bad array number that has leading zeros",
389+
"doc": ["foo", "bar"],
390+
"patch": [{"op": "test", "path": "/00", "value": "foo"}],
391+
"error": "test op should reject the array value, it has leading zeros" },
392+
393+
{ "comment": "test with bad array number that has leading zeros",
394+
"doc": ["foo", "bar"],
395+
"patch": [{"op": "test", "path": "/01", "value": "bar"}],
396+
"error": "test op should reject the array value, it has leading zeros" }
397+
387398
]

0 commit comments

Comments
 (0)