more fixes for json_escape

This commit is contained in:
alisdair sullivan 2012-03-30 23:17:05 -07:00
parent cd1a6deaaa
commit ad3e870615
2 changed files with 22 additions and 4 deletions

View file

@ -1452,6 +1452,19 @@ escape_forward_slash_test_() ->
].
json_escape_test_() ->
[
{"json escape test", ?_assertEqual(
decode(<<"[\"a string\\n\"]">>, [json_escape]),
[start_array, {string, <<"a string\\n">>}, end_array, end_json]
)},
{"no json escape test", ?_assertEqual(
decode(<<"[\"a string\\n\"]">>, []),
[start_array, {string, <<"a string\n">>}, end_array, end_json]
)}
].
noncharacters_test_() ->
[
{"noncharacters - badjson",