From a402497b8a75289ebd8b92c4641509ec4c30a020 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 13:37:36 +0200 Subject: Reuse acquired motion plans --- tests/run.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index 22a9003..7caeb6c 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7284,6 +7284,33 @@ test("Fresh primary resolution uses its initiating descriptor", function() end end) +test("Fresh primary resolution reuses acquired plans and marks empty motion", function() + fresh_sequence_state() + local host = MemoryHost.new({ + buffer_lines = { "aba" }, + input_packets = { + { kind = "special_key", name = "Left", bytes = { 0x80, 0x01 } }, + }, + configuration = { + mark_cursor = false, + mark_char = false, + }, + }) + local coordinator = sequence_coordinator.new({ host = host }) + local invocation = coordinator:read_primary_invocation() + local acquired = coordinator:acquire_primary("f", invocation) + local resolution = coordinator:fresh_primary_resolution( + "f", + acquired, + invocation + ) + + same(acquired.target_plan, resolution.target_plan) + same(acquired.motion_plan, resolution.motion_plan) + same(domain.TargetPlanKind.EMPTY, resolution.target_plan.kind) + truthy(resolution.skip_destination) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3