From 15ed87626e8774ea2a54a82ff3bf9ac399ba4fc0 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 13:41:10 +0200 Subject: Build repeated movement plan --- tests/run.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index da13a3b..eb82d0b 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7478,6 +7478,36 @@ test("Primary repetition builds one target plan from live matching policy", func truthy(insensitive.target_plan:matches("A")) end) +test("Primary repetition builds its effective contextual motion plan", function() + local _, transitions = fresh_sequence_state() + local landing = domain.Position.new(1, 3) + transitions:BeginAcquisition("v", "t") + transitions:CommitAcquiredTarget("v", target("a")) + transitions:CommitVisualSuccess("v", landing) + local host = MemoryHost.new({ + buffer_lines = { "ababa" }, + cursor = landing, + mode = "v", + selection = domain.Selection.active( + domain.SelectionKind.CHARACTER, + domain.Position.new(1, 1), + landing, + domain.SelectionOption.EXCLUSIVE + ), + }) + + local resolution = sequence_coordinator.new({ host = host }):primary("F") + + 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.BUFFER, resolution.motion_plan.search_scope) + same( + domain.EndpointPolicy.VISUAL_EXCLUSIVE, + 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