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,
|
|
|
|
}
|