made sandbox immune to while trues

This commit is contained in:
kikito
2013-09-03 12:53:26 +02:00
parent 95069bd456
commit ea90a3c971
2 changed files with 27 additions and 2 deletions

View File

@@ -38,6 +38,10 @@ describe('sandbox', function()
assert.equal('hellohello', string.rep('hello', 2))
end)
it('#focus throws an error with infinite loops', function()
assert.has_error(function() sandbox("while true do end") end)
end)
end)