mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
15 lines
460 B
Lua
15 lines
460 B
Lua
local errValue = newproxy(false)
|
|
|
|
local success, result = pcall(function()
|
|
error({
|
|
Inner = errValue,
|
|
})
|
|
end)
|
|
|
|
assert(not success, "Pcall succeeded when erorred")
|
|
|
|
assert(result ~= nil, "Pcall did not return error")
|
|
assert(type(result) == "table", "Pcall error value should have been a table")
|
|
|
|
assert(result.Inner ~= nil, "Pcall error table should contain inner value")
|
|
assert(result.Inner == errValue, "Pcall error table should have correct inner value")
|