From f52894183ed7f8f0d19afc095fe711f35d6847f7 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:44:48 +0200 Subject: Store primary timer identity --- tests/run.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index 76d6f50..a511fb0 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -6624,6 +6624,27 @@ test("A new primary timer stops the prior timer first", function() truthy(host:timers()[second].active) end) +test("Each new highlight timer identity is stored in sequence state", function() + local state, transitions = fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { + mark_char = true, + highlight_timeout_ms = 40, + }, + }) + local feedback = feedback_service.new({ + host = host, + transitions = transitions, + }) + + local first = feedback:start_highlight_timer() + same(first, state.highlight_timer) + local second = feedback:start_highlight_timer() + same(second, state.highlight_timer) + falsy(first == second) + same(40, host:timers()[second].delay_ms) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3