1
0

Added resilience test for loading library.lua

This commit is contained in:
Jon Michael Aanes 2016-12-30 12:03:14 +01:00
parent 061ffb2d9e
commit 961bdf4a90

19
test/test_resilience.lua Normal file
View File

@ -0,0 +1,19 @@
local SUITE = require('TestSuite').new('resilience')
SUITE:setEnviroment{
--format = require('pretty')
}
--------------------------------------------------------------------------------
SUITE:addTest('library', function ()
-- This tests whether one could load the library with an empty env, without
-- an error.
local chunk = loadfile('./library.lua')
setfenv(chunk, {})
local library = chunk()
end)
--------------------------------------------------------------------------------
return SUITE