summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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