summaryrefslogtreecommitdiff
path: root/tests/run.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run.lua')
-rw-r--r--tests/run.lua25
1 files changed, 25 insertions, 0 deletions
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