diff options
| -rw-r--r-- | tests/run.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index f954b7c..ea0d207 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -5730,6 +5730,36 @@ test("Acquisition preserves descriptor writes after input failure", function() same(old_target, state:get_previous_target("n")) end) +test("Escape acquisition stays outside highlight timer start", function() + local state, transitions = fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { + mark_cursor = false, + mark_char = true, + highlight_timeout_ms = 25, + }, + input_packets = { + { kind = "special_key", name = "Escape", bytes = { 27 } }, + }, + }) + local feedback = feedback_service.new({ + host = host, + transitions = transitions, + }) + local result = acquisition_service.new({ + host = host, + transitions = transitions, + feedback = feedback, + }):acquire("f", "n", domain.Position.new(1, 1), nil, nil) + + same(domain.ActionKind.ESCAPE, result.outcome.kind) + same(nil, state.highlight_timer) + same(0, #feedback:persistent_requests()) + for _, operation in ipairs(host:operations()) do + falsy(operation.operation == "start_timer") + end +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
