Skip to content

Commit

Permalink
Fixes Lua script line numbers in json_test
Browse files Browse the repository at this point in the history
The error messages are line-number specific and they have shifted after
rebasing off of layeh/gopher-json master.
  • Loading branch information
Greg Smith committed May 18, 2020
1 parent abecb61 commit ec5e9c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions json_test.go
Expand Up @@ -46,13 +46,13 @@ func TestSimple(t *testing.T) {
assert(json.decode("null") == nil)
local status, err = pcall(function() json.decode() end)
assert(err == "<string>:35: bad argument #1 to decode", err)
assert(err == "<string>:38: bad argument #1 to decode", err)
local status, err = pcall(function() json.decode(1,2) end)
assert(err == "<string>:37: bad argument #1 to decode", err)
assert(err == "<string>:40: bad argument #1 to decode", err)
local status, err = pcall(function() json.encode() end)
assert(err == "<string>:39: bad argument #1 to encode", err)
assert(err == "<string>:42: bad argument #1 to encode", err)
local status, err = pcall(function() json.encode(1,2) end)
assert(err == "<string>:41: bad argument #1 to encode", err)
assert(err == "<string>:44: bad argument #1 to encode", err)
assert(json.decode(json.encode({person={name = "tim",}})).person.name == "tim")
Expand Down

0 comments on commit ec5e9c4

Please sign in to comment.