summaryrefslogtreecommitdiff
path: root/tests/common.lua
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-05-08 20:26:09 +0930
committerMark Pulford <mark@kyne.com.au>2011-05-08 20:26:09 +0930
commit4dc56c6d362f2cd8a79d83369f0b852df07dae3f (patch)
treed51d3470a396c7981871b4f6fe4fd331e180db83 /tests/common.lua
parenteeebeda88e62fefa87c71d616d5719782bdaa45a (diff)
downloadlua-cjson-4dc56c6d362f2cd8a79d83369f0b852df07dae3f.tar.gz
lua-cjson-4dc56c6d362f2cd8a79d83369f0b852df07dae3f.tar.bz2
lua-cjson-4dc56c6d362f2cd8a79d83369f0b852df07dae3f.zip
Add UTF-16 surrogate pair decode support
- Add tests for UTF-16 decoding and failures - Add getutf8.pl to assist with UTF-16 decode testing - Re-add test_decode_cycle() which was accidentally removed earlier - Rename bytestring.dat to octets-escaped.dat
Diffstat (limited to 'tests/common.lua')
-rw-r--r--tests/common.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/common.lua b/tests/common.lua
index 9a7ed19..b8ce01d 100644
--- a/tests/common.lua
+++ b/tests/common.lua
@@ -99,6 +99,10 @@ function file_load(filename)
99 local data = file:read("*a") 99 local data = file:read("*a")
100 file:close() 100 file:close()
101 101
102 if data == nil then
103 error("Failed to read " .. filename)
104 end
105
102 return data 106 return data
103end 107end
104 108