diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:51:44 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:51:44 +0200 |
| commit | fa79c6d1c815fb87086b0cdd4eb48d55fe865134 (patch) | |
| tree | 97524fb31b717321774630de367aa65dc195b7bd /tests | |
| parent | 9c02e7c3331416c22927ec1a78fc9a5724e10427 (diff) | |
Commit Visual success
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 725fe98..743308d 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -3419,6 +3419,42 @@ test("Visual execution applies exact endpoints for every selection kind", functi end end) +test("Complete Visual execution commits landing and first-move state", function() + local state, transitions = fresh_sequence_state() + local target_value = target("x") + transitions:BeginAcquisition("v", "f") + transitions:CommitAcquiredTarget("v", target_value) + + local origin = domain.Position.new(1, 1) + local host = MemoryHost.new({ + buffer_lines = { "abx" }, + cursor = origin, + mode = "v", + selection = domain.Selection.active( + domain.SelectionKind.CHARACTER, + origin, + origin, + domain.SelectionOption.INCLUSIVE + ), + }) + local plan = motion_plan.build( + target_plan.build(target_value, matching_policy()), + "f" + ) + local outcome = motion_executor.new(host):execute( + text_topology.from_host(host), + "v", + plan, + 1, + true + ) + + same(domain.ActionKind.MOVEMENT, outcome.kind) + same(domain.Position.new(1, 3), state:get_previous_landing("v")) + falsy(state:get_first_move("v")) + same(target_value, state:get_previous_target("v")) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
