forked from github/server
42f1030251
even though it has mostly the same rules, it does not have xmastrees, and loads a different config remove dead `inactivefaction` function, we have no use for the file it creates.
24 lines
824 B
Lua
24 lines
824 B
Lua
-- 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
|
|
|
|
path = 'scripts'
|
|
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)
|
|
end
|
|
package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
|
|
|
|
config.rules = 'e3'
|
|
|
|
require 'eressea'
|
|
require 'eressea.path'
|
|
require 'eressea.xmlconf'
|
|
require 'tests.e3'
|
|
require 'tests.xmas'
|
|
require 'lunit'
|
|
|
|
eressea.settings.set("rules.alliances", "0")
|
|
rules = require('eressea.' .. config.rules)
|
|
result = lunit.main()
|
|
return result.errors + result.failed
|