diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:50:37 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:50:37 +0200 |
| commit | 6fb1cc4e2840a359f628245d7fb81d4666246780 (patch) | |
| tree | ac6ec1c5c9ff873d31e0fabe12400a3ccdf69c31 /tests/run.lua | |
| parent | 3b0769600b73db271c8cb694d1c8cf7a00493e1b (diff) | |
Commit command success
Diffstat (limited to 'tests/run.lua')
| -rw-r--r-- | tests/run.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 09a0375..97fbacb 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -3311,6 +3311,35 @@ test("Command success requests feedback migration before state commit", function falsy(observed.moved_forward) end) +test("Complete command execution commits direction and landing", function() + local state, transitions = fresh_sequence_state() + local target_value = target("a") + transitions:BeginAcquisition("n", "f") + transitions:CommitAcquiredTarget("n", target_value) + + local host = MemoryHost.new({ + buffer_lines = { "aba" }, + cursor = { line = 1, byte_column = 1 }, + }) + 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), + "n", + plan, + 1, + true + ) + + same(domain.ActionKind.MOVEMENT, outcome.kind) + same(domain.Position.new(1, 3), state:get_previous_landing("n")) + falsy(state:get_first_move("n")) + truthy(state.moved_forward) + truthy(state.moved_forward_initialized) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
