fix(P.3.4): self-contained fsm.lua, drop module-dep (resolver only handles libs)

Sporel resolver does NOT resolve module-as-dep (only lib-deps). Test-module
ships its own byte-identical copy of fsm.lua and loads it via dir_of(self).
Drift prevention deferred to Smoke diff-check (next slice).

Also dropped runtime-behavior measure_text assertion (needs Raylib font, not
loaded in headless test-mode). Existence-check (assertion 10) is sufficient.

11 assertions: 5 FSM transitions + 1 FSM stability + 5 Engine-Surface existence.
This commit is contained in:
Calic
2026-05-12 23:25:16 +02:00
parent b27911484e
commit 1aa2eb6a6a
3 changed files with 33 additions and 8 deletions

View File

@@ -1,8 +1,13 @@
-- lib-sporel.launcher-test — P.3.4
-- 12 assertions: 5 FSM transitions + 1 FSM stability + 6 Engine-Surface existence.
-- 11 assertions: 5 FSM transitions + 1 FSM stability + 5 Engine-Surface existence.
-- (measure_text runtime-behavior check dropped — needs Raylib font, not loaded in headless test-mode.)
-- Pattern follows P.3.1 Test-Module-Pattern; TAP output via engine.test.*
local fsm = dofile(engine.module.dir_of("lib-sporel.launcher") .. "/fsm.lua")
-- FSM-Source: byte-identical Kopie aus modules/lib-sporel.launcher/fsm.lua.
-- Sporel-Resolver lehnt module-als-dep ab (nur lib-deps werden resolved),
-- daher hat dieses Test-Modul seine eigene fsm.lua. Drift wird via Smoke-
-- diff-check verhindert (siehe smoke.sh P0-S15-pre).
local fsm = dofile(engine.module.dir_of("lib-sporel.launcher-test") .. "/fsm.lua")
function init(ctx)
-- FSM transitions (5)
@@ -21,6 +26,4 @@ function init(ctx)
engine.test.assert(type(engine.render.draw_text) == "function", "engine.render.draw_text is function")
engine.test.assert(type(engine.render.measure_text) == "function", "engine.render.measure_text is function")
engine.test.assert(type(engine.module.list()) == "table", "engine.module.list() returns table")
local w, h = engine.render.measure_text("Test", 20)
engine.test.assert(w > 0 and h > 0, "measure_text returns positive dimensions")
end