mirror of
https://github.com/TangentFoxy/lua-sandbox.git
synced 2025-07-28 02:52:22 +00:00
more fiddling with string.rep
This commit is contained in:
@@ -33,6 +33,11 @@ describe('sandbox', function()
|
||||
assert.equal('hellohello', string.rep('hello', 2))
|
||||
end)
|
||||
|
||||
it('restores string.rep even if there is an error', function()
|
||||
assert.has_error(function() sandbox("error('foo')") end)
|
||||
assert.equal('hellohello', string.rep('hello', 2))
|
||||
end)
|
||||
|
||||
|
||||
|
||||
end)
|
||||
|
Reference in New Issue
Block a user