2015-02-13 16:03:05 +01:00
|
|
|
-- Tests that work in E3. With game config of E3.
|
|
|
|
-- Tests are under scripts/test/e3 and all files must be in scripts/test/e3/init.lua
|
2014-12-31 21:07:42 +01: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-12-31 21:07:42 +01:00
|
|
|
end
|
|
|
|
package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
|
|
|
|
|
|
|
|
config.rules = 'e3'
|
|
|
|
|
|
|
|
require 'eressea'
|
|
|
|
require 'eressea.path'
|
|
|
|
require 'eressea.xmlconf'
|
|
|
|
require 'tests.e3'
|
2015-09-12 14:10:08 +02:00
|
|
|
require 'tests.xmas'
|
2014-12-31 21:07:42 +01:00
|
|
|
require 'lunit'
|
|
|
|
|
|
|
|
eressea.settings.set("rules.alliances", "0")
|
|
|
|
rules = require('eressea.' .. config.rules)
|
2015-02-16 16:59:07 +01:00
|
|
|
result = lunit.main()
|
2015-05-21 08:27:07 +02:00
|
|
|
return result.errors + result.failed
|