From 4aa8704dc0de5a691ddd5a71f0e3a81659463798 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:43:53 +0200 Subject: Gate persistent highlight timeout --- tests/run.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index c626444..aa01e7f 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -6561,6 +6561,34 @@ test("Visual movement retains its persistent feedback anchor", function() truthy(host:highlights()[persistent.identity] ~= nil) end) +test("Highlight timeout requires marks delay and timer support", function() + for _, mark_char in ipairs({ false, true }) do + for _, delay in ipairs({ 0, 25 }) do + for _, supported in ipairs({ false, true }) do + fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { + mark_char = mark_char, + highlight_timeout_ms = delay, + }, + timer_support = supported, + }) + local actual = feedback_service.new(host):highlight_timer_delay() + local expected = mark_char and delay > 0 and supported and delay or nil + same( + expected, + actual, + table.concat({ + tostring(mark_char), + tostring(delay), + tostring(supported), + }, ":") + ) + end + end + end +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3