From 75ee6bfcf40b531024fad9a5ebb0908859769816 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Sun, 8 May 2011 20:57:05 +0930 Subject: Generate error when attempting to decode UTF-16/32 --- tests/test.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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' }, -- cgit v1.2.3-55-g6feb