From d147006c641b247a2505a8084f62ae519835288d Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sat, 25 Oct 2025 11:10:45 +0200 Subject: [PATCH] Add integration test --- scripts/data/integration_tests/test_lua_api/global.lua | 7 +++++++ scripts/data/integration_tests/test_lua_api/menu.lua | 1 + 2 files changed, 8 insertions(+) diff --git a/scripts/data/integration_tests/test_lua_api/global.lua b/scripts/data/integration_tests/test_lua_api/global.lua index fec0b4ead6..dbc1864195 100644 --- a/scripts/data/integration_tests/test_lua_api/global.lua +++ b/scripts/data/integration_tests/test_lua_api/global.lua @@ -7,6 +7,13 @@ local vfs = require('openmw.vfs') local world = require('openmw.world') local I = require('openmw.interfaces') +testing.registerGlobalTest('crash in lua coroutine when accessing type (#8757)', function() + local co = coroutine.wrap(function() + testing.expectEqual(tostring(world.players[1].type), 'Player') + end) + co() +end) + testing.registerGlobalTest('timers', function() testing.expectAlmostEqual(core.getGameTimeScale(), 30, 'incorrect getGameTimeScale() result') testing.expectAlmostEqual(core.getSimulationTimeScale(), 1, 'incorrect getSimulationTimeScale result') diff --git a/scripts/data/integration_tests/test_lua_api/menu.lua b/scripts/data/integration_tests/test_lua_api/menu.lua index ca5f40c526..52c2c15d00 100644 --- a/scripts/data/integration_tests/test_lua_api/menu.lua +++ b/scripts/data/integration_tests/test_lua_api/menu.lua @@ -61,6 +61,7 @@ local function registerGlobalTest(name, description) end) end +registerGlobalTest('crash in lua coroutine when accessing type (#8757)') registerGlobalTest('timers') registerGlobalTest('teleport') registerGlobalTest('getGMST')