summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 0663c2e..792f15b 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -6436,6 +6436,25 @@ test("Cross-line command movement rebuilds feedback at destination", function()
same(2, state.target_overlays[1].anchor_line)
end)
+test("TILL migration requires a repeated move", function()
+ local shared_target = target_plan.build(target("a"), matching_policy())
+ local till = motion_plan.build(shared_target, "t")
+ local find = motion_plan.build(shared_target, "f")
+
+ falsy(feedback_service.repeated_till_migration_candidate({
+ resolved_motion_plan = till,
+ first_move = true,
+ }))
+ truthy(feedback_service.repeated_till_migration_candidate({
+ resolved_motion_plan = till,
+ first_move = false,
+ }))
+ falsy(feedback_service.repeated_till_migration_candidate({
+ resolved_motion_plan = find,
+ first_move = false,
+ }))
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then