From 961bdf4a905259a26327ebc2f218f0d02912266f Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Fri, 30 Dec 2016 12:03:14 +0100 Subject: [PATCH] Added resilience test for loading library.lua --- test/test_resilience.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/test_resilience.lua diff --git a/test/test_resilience.lua b/test/test_resilience.lua new file mode 100644 index 0000000..1af67fb --- /dev/null +++ b/test/test_resilience.lua @@ -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