mirror of
https://github.com/TangentFoxy/rxi-json.lua.git
synced 2025-07-28 02:52:17 +00:00
Replaced new-line-in-string check with control-char check; tests
This commit is contained in:
@@ -133,12 +133,14 @@ test("decode invalid", function()
|
||||
end)
|
||||
|
||||
|
||||
test("decode invalid escape", function()
|
||||
test("decode invalid string", function()
|
||||
local t = {
|
||||
[["\z"]],
|
||||
[["\1"]],
|
||||
[["\u000z"]],
|
||||
[["\ud83d\ude0q"]]
|
||||
[["\ud83d\ude0q"]],
|
||||
'"x\ny"',
|
||||
'"x\0y"',
|
||||
}
|
||||
for i, v in ipairs(t) do
|
||||
local status, err = pcall(json.decode, v)
|
||||
|
Reference in New Issue
Block a user