1
0
Fork 0

Additional string tests

master
rxi 2020-04-05 11:56:43 +01:00
parent 2e76cfb067
commit 6d080a1a66
1 changed files with 6 additions and 0 deletions

View File

@ -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)