2015-02-13 16:03:05 +01:00
|
|
|
-- Basic test without loading XML Config. Test care about needed settings.
|
|
|
|
-- Tests are under scripts/test/ and all files must be in scripts/test/init.lua
|
2014-07-26 22:52:25 +02:00
|
|
|
|
|
|
|
path = 'scripts'
|
2015-02-13 16:03:05 +01:00
|
|
|
if config.install then
|
|
|
|
path = config.install .. '/' .. path
|
|
|
|
package.path = package.path .. ';' .. config.install .. '/lunit/?.lua'
|
|
|
|
--needed to find lunit if not run form eressea root. Needs right [lua] install setting in eressea.ini (point to eressea root from the start folder)
|
2014-07-26 22:52:25 +02:00
|
|
|
end
|
2014-08-03 12:43:16 +02:00
|
|
|
package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
|
2014-07-26 22:52:25 +02:00
|
|
|
|
2014-08-03 12:43:16 +02:00
|
|
|
require 'eressea'
|
2014-08-07 13:19:19 +02:00
|
|
|
require 'eressea.path'
|
|
|
|
require 'tests'
|
2014-07-26 22:52:25 +02:00
|
|
|
require 'lunit'
|
2015-02-16 16:59:07 +01:00
|
|
|
result = lunit.main()
|
|
|
|
return result.errors
|