diff options
| author | Mark Pulford <mark@kyne.com.au> | 2011-05-08 20:57:05 +0930 |
|---|---|---|
| committer | Mark Pulford <mark@kyne.com.au> | 2011-05-08 20:57:05 +0930 |
| commit | 75ee6bfcf40b531024fad9a5ebb0908859769816 (patch) | |
| tree | a9344b75a770bd5d439a7d505525a0f77d5cece3 /tests/test.lua | |
| parent | 4dc56c6d362f2cd8a79d83369f0b852df07dae3f (diff) | |
| download | lua-cjson-75ee6bfcf40b531024fad9a5ebb0908859769816.tar.gz lua-cjson-75ee6bfcf40b531024fad9a5ebb0908859769816.tar.bz2 lua-cjson-75ee6bfcf40b531024fad9a5ebb0908859769816.zip | |
Generate error when attempting to decode UTF-16/32
Diffstat (limited to '')
| -rwxr-xr-x | tests/test.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test.lua b/tests/test.lua index 0e0aad8..ab2fe7c 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
| @@ -64,6 +64,10 @@ local encode_table_tests = { | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | local decode_error_tests = { | 66 | local decode_error_tests = { |
| 67 | { json.decode, { '\0"\0"' }, | ||
| 68 | false, { "JSON parser does not support UTF-16 or UTF-32" } }, | ||
| 69 | { json.decode, { '"\0"\0' }, | ||
| 70 | false, { "JSON parser does not support UTF-16 or UTF-32" } }, | ||
| 67 | { json.decode, { '{ "unexpected eof": ' }, | 71 | { json.decode, { '{ "unexpected eof": ' }, |
| 68 | false, { "Expected value but found T_END at character 21" } }, | 72 | false, { "Expected value but found T_END at character 21" } }, |
| 69 | { json.decode, { '{ "extra data": true }, false' }, | 73 | { json.decode, { '{ "extra data": true }, false' }, |
