summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 2f470d8..4d512be 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -6861,6 +6861,44 @@ test("Resolved primary actions refresh the highlight timer", function()
same(repeated, state.highlight_timer)
end)
+test("Explicit motion execution bypasses primary feedback operations", function()
+ fresh_sequence_state()
+ local host = MemoryHost.new({
+ buffer_lines = { "aba" },
+ cursor = { line = 1, byte_column = 1 },
+ emit_movement_events = false,
+ })
+ local restore_count = 0
+ local refresh_count = 0
+ local migration_count = 0
+ local feedback = {
+ migrate_command = function()
+ migration_count = migration_count + 1
+ end,
+ restore_primary = function()
+ restore_count = restore_count + 1
+ end,
+ refresh_primary = function()
+ refresh_count = refresh_count + 1
+ end,
+ }
+ local target_value = target("a")
+ local plan = motion_plan.build(
+ target_plan.build(target_value, matching_policy()),
+ "f"
+ )
+
+ local outcome = motion_executor.new({
+ host = host,
+ feedback_service = feedback,
+ }):execute(text_topology.from_host(host), "n", plan, 1, false)
+
+ same(domain.ActionKind.MOVEMENT, outcome.kind)
+ same(1, migration_count)
+ same(0, restore_count)
+ same(0, refresh_count)
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then