From 26e79b1a99624c43c4149bd09b047af19c615a1c Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 10:49:27 +0200 Subject: Classify stationary TILL moves --- tests/run.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index dd0da6f..2b1613c 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -3245,6 +3245,30 @@ test("Complete command direction compares destination with saved origin", functi falsy(motion_executor.moved_forward(origin, origin)) end) +test("A stationary first TILL completion is not forward movement", function() + local origin = domain.Position.new(1, 1) + falsy(motion_executor.command_moved_forward("t", origin, origin)) + + local host = MemoryHost.new({ + buffer_lines = { "ab" }, + cursor = origin, + }) + local plan = motion_plan.build( + target_plan.build(target("b"), matching_policy()), + "t" + ) + local outcome = motion_executor.new(host):execute( + text_topology.from_host(host), + "n", + plan, + 1, + true + ) + same(domain.ActionKind.MOVEMENT, outcome.kind) + same(origin, outcome.position) + same(1, outcome.successful_steps) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3