summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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