add additional comment tests
This commit is contained in:
parent
ff6a83598b
commit
5c96222cbf
1 changed files with 16 additions and 0 deletions
|
@ -1423,6 +1423,22 @@ comments_test_() ->
|
|||
{"/**/ comment terminating exp", ?_assertEqual(
|
||||
decode(<<"[ 1e1/* comment */ ]">>, [comments]),
|
||||
[start_array, {float, 1.0e1}, end_array, end_json]
|
||||
)},
|
||||
{"/**/ comment following /**/ comment", ?_assertEqual(
|
||||
decode(<<"[/* comment *//* comment */true]">>, [comments]),
|
||||
[start_array, {literal, true}, end_array, end_json]
|
||||
)},
|
||||
{"/**/ comment following // comment", ?_assertEqual(
|
||||
decode(<<"[// comment", ?newline, "/* comment */true]">>, [comments]),
|
||||
[start_array, {literal, true}, end_array, end_json]
|
||||
)},
|
||||
{"// comment following /**/ comment", ?_assertEqual(
|
||||
decode(<<"[/* comment */// comment", ?newline, "true]">>, [comments]),
|
||||
[start_array, {literal, true}, end_array, end_json]
|
||||
)},
|
||||
{"// comment following // comment", ?_assertEqual(
|
||||
decode(<<"[// comment", ?newline, "// comment", ?newline, "true]">>, [comments]),
|
||||
[start_array, {literal, true}, end_array, end_json]
|
||||
)}
|
||||
].
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue