add test for number terminated by comma in object
This commit is contained in:
parent
2f26f2e3e8
commit
f2dc42b7c9
1 changed files with 8 additions and 0 deletions
|
@ -1000,6 +1000,14 @@ special_number_test_() ->
|
||||||
{"number terminated by whitespace", ?_assertEqual(
|
{"number terminated by whitespace", ?_assertEqual(
|
||||||
[start_array, {integer, 1}, end_array, end_json],
|
[start_array, {integer, 1}, end_array, end_json],
|
||||||
decode(<<"[ 1 ]">>, [])
|
decode(<<"[ 1 ]">>, [])
|
||||||
|
)},
|
||||||
|
{"number terminated by comma", ?_assertEqual(
|
||||||
|
[start_array, {integer, 1}, {integer, 1}, end_array, end_json],
|
||||||
|
decode(<<"[ 1, 1 ]">>, [])
|
||||||
|
)},
|
||||||
|
{"number terminated by comma in object", ?_assertEqual(
|
||||||
|
[start_object, {key, <<"x">>}, {integer, 1}, {key, <<"y">>}, {integer, 1}, end_object, end_json],
|
||||||
|
decode(<<"{\"x\": 1, \"y\": 1}">>, [])
|
||||||
)}
|
)}
|
||||||
].
|
].
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue