Skip to content

Commit 6d080a1

Browse files
committed
Additional string tests
1 parent 2e76cfb commit 6d080a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,16 @@ end)
6666

6767

6868
test("strings", function()
69+
local s = ""
70+
assert( s == json.decode( json.encode(s) ) )
71+
local s = "\\"
72+
assert( s == json.decode( json.encode(s) ) )
6973
local s = "Hello world"
7074
assert( s == json.decode( json.encode(s) ) )
7175
local s = "\0 \13 \27"
7276
assert( s == json.decode( json.encode(s) ) )
77+
local s = "\0\r\n\8"
78+
assert( s == json.decode( json.encode(s) ) )
7379
end)
7480

7581

0 commit comments

Comments
 (0)