mirror of https://github.com/rxi/json.lua.git
Additional string tests
parent
2e76cfb067
commit
6d080a1a66
|
@ -66,10 +66,16 @@ end)
|
|||
|
||||
|
||||
test("strings", function()
|
||||
local s = ""
|
||||
assert( s == json.decode( json.encode(s) ) )
|
||||
local s = "\\"
|
||||
assert( s == json.decode( json.encode(s) ) )
|
||||
local s = "Hello world"
|
||||
assert( s == json.decode( json.encode(s) ) )
|
||||
local s = "\0 \13 \27"
|
||||
assert( s == json.decode( json.encode(s) ) )
|
||||
local s = "\0\r\n\8"
|
||||
assert( s == json.decode( json.encode(s) ) )
|
||||
end)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue