From 7ec26094fee806bf53f3eb253b57f3a06025c70d Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 13:47:20 +0200 Subject: Build explicit motion plans --- tests/run.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index c755c05..204a0f3 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7768,6 +7768,31 @@ test("Explicit coordination keeps code-zero target fallback", function() end end) +test("Explicit coordination builds target and resolved motion plans", function() + local _, transitions = fresh_sequence_state() + local stored_target = target("a") + transitions:BeginAcquisition("n", "t") + transitions:CommitAcquiredTarget("n", stored_target) + local host = MemoryHost.new({ + buffer_lines = { "aA" }, + configuration = { + ignore_case = true, + search_current_line_only = true, + }, + }) + local coordinator = sequence_coordinator.new({ host = host }) + + local resolution = coordinator:repeat_opposite_direction() + + same(stored_target, resolution.target) + same(domain.CaseMode.INSENSITIVE, resolution.target_plan.case_mode) + same(resolution.target_plan, resolution.motion_plan.target_plan) + same(domain.Descriptor.TILL_BACKWARD, resolution.effective_descriptor) + same(resolution.effective_descriptor, resolution.motion_plan.descriptor) + same(domain.SearchScope.CURRENT_LINE, resolution.motion_plan.search_scope) + same(domain.EndpointPolicy.REGULAR, resolution.motion_plan.endpoint_policy) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3