1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 03:19:44 +00:00
OpenMW/scripts/data/morrowind_tests/global.lua

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
833 B
Lua
Raw Normal View History

2024-05-10 08:11:17 +00:00
local testing = require('testing_util')
local util = require('openmw.util')
local world = require('openmw.world')
local core = require('openmw.core')
local types = require('openmw.types')
if not core.contentFiles.has('Morrowind.esm') then
error('This test requires Morrowind.esm')
end
function makeTests(modules)
local tests = {}
for _, moduleName in ipairs(modules) do
local module = require(moduleName)
for _, v in ipairs(module) do
table.insert(tests, {string.format('[%s] %s', moduleName, v[1]), v[2]})
end
end
return tests
end
local testModules = {
'global_issues',
'global_dialogues',
2024-06-17 20:06:53 +00:00
'global_mwscript',
2024-05-10 08:11:17 +00:00
}
return {
engineHandlers = {
onUpdate = testing.testRunner(makeTests(testModules)),
},
eventHandlers = testing.eventHandlers,
}