summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:42:23 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:42:23 +0200
commitd0a4b41cae2390d90bb9353756f67330a3ef8e80 (patch)
treed2b09afc70f7d1bcc207c6f76f3416f6b7a789dd /tests
parentc55cd67ff7f38e4f68a955673a69aeb7eae56f19 (diff)
Compare TILL movement directions
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 792f15b..b770884 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -6455,6 +6455,23 @@ test("TILL migration requires a repeated move", function()
}))
end)
+test("Repeated TILL migration compares movement directions", function()
+ local shared_target = target_plan.build(target("a"), matching_policy())
+ local till = motion_plan.build(shared_target, "T")
+ local request = {
+ resolved_motion_plan = till,
+ first_move = false,
+ moved_forward = false,
+ previous_moved_forward = true,
+ }
+
+ truthy(feedback_service.till_direction_changed(request))
+ request.previous_moved_forward = false
+ falsy(feedback_service.till_direction_changed(request))
+ request.first_move = true
+ falsy(feedback_service.till_direction_changed(request))
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then