mirror of
https://github.com/TangentFoxy/lua-sandbox.git
synced 2025-07-28 11:02:21 +00:00
feat(sandbox) return multiple values
This commit is contained in:
committed by
Enrique García Cota
parent
8974b8869c
commit
9f83b8914a
@@ -34,6 +34,11 @@ describe('sandbox.run', function()
|
||||
assert.error(function() sandbox.run('return setmetatable({}, {})') end)
|
||||
assert.error(function() sandbox.run('return string.rep("hello", 5)') end)
|
||||
end)
|
||||
|
||||
it('does return multiple values', function()
|
||||
local result = { sandbox.run("return 'hello', 'world'") }
|
||||
assert.same({ 'hello', 'world' }, result)
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('when handling string.rep', function()
|
||||
|
Reference in New Issue
Block a user