Add an integration test

This commit is contained in:
Evil Eye
2026-03-01 20:58:14 +01:00
parent 881bb10c6d
commit 8ebb981bdb
4 changed files with 17 additions and 0 deletions
@@ -386,6 +386,12 @@ testing.registerGlobalTest('mwscript magic interactions', function()
testing.expectEqual(globals.OpenMW_Tests_Failed, 0, 'OpenMW_Tests should run without issue')
end)
testing.registerGlobalTest('load script generated static', function()
local record = types.Static.records.OMW_Generated_Static
testing.expectNotEqual(record, nil, 'OMW_Generated_Static should have been generated')
testing.expectEqual(record.model, 'meshes/generatedonload.nif')
end)
return {
engineHandlers = {
onUpdate = testing.updateGlobal,
@@ -0,0 +1,9 @@
local content = require('openmw.content')
return {
engineHandlers = {
onContentFilesLoaded = function()
content.statics.records.OMW_Generated_Static = { model = 'meshes/generatedonload.nif' }
end
}
}
@@ -76,6 +76,7 @@ registerGlobalTest('commit crime')
registerGlobalTest('record model property')
registerGlobalTest('nan float', 'world.setGameTimeScale should not accept nan')
registerGlobalTest('nan vector', 'weather.stormDirection should not accept a vector with a nan component')
registerGlobalTest('load script generated static')
registerGlobalTest('player yaw rotation', 'rotating player with controls.yawChange should change rotation')
registerGlobalTest('player pitch rotation', 'rotating player with controls.pitchChange should change rotation')
@@ -1,3 +1,4 @@
MENU: menu.lua
GLOBAL: global.lua
PLAYER: player.lua
LOAD: load.lua