summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:44:48 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:44:48 +0200
commitf52894183ed7f8f0d19afc095fe711f35d6847f7 (patch)
treea39e8572636e0a71980be9712f5d54b60d957c2d
parentda836c7b19f107e2d01cbd5be30f9584ecae3cb6 (diff)
Store primary timer identity
-rw-r--r--tests/run.lua21
1 files changed, 21 insertions, 0 deletions
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