Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpx/lua-cjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-05-08 15:27:05 +0400
committerMark Pulford <mark@kyne.com.au>2011-05-08 15:27:05 +0400
commit75ee6bfcf40b531024fad9a5ebb0908859769816 (patch)
treea9344b75a770bd5d439a7d505525a0f77d5cece3 /tests
parent4dc56c6d362f2cd8a79d83369f0b852df07dae3f (diff)
Generate error when attempting to decode UTF-16/32
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test.lua4
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 = {
}
local decode_error_tests = {
+ { json.decode, { '\0"\0"' },
+ false, { "JSON parser does not support UTF-16 or UTF-32" } },
+ { json.decode, { '"\0"\0' },
+ false, { "JSON parser does not support UTF-16 or UTF-32" } },
{ json.decode, { '{ "unexpected eof": ' },
false, { "Expected value but found T_END at character 21" } },
{ json.decode, { '{ "extra data": true }, false' },