diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:48:14 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:48:14 +0200 |
| commit | 23e121d2f74ad2dd1ab0902f120aa90bee2c7edb (patch) | |
| tree | 39346fe7a13ad2b4b3d016510fdb69f944caea5a /tests/run.lua | |
| parent | ba60993e80bc7e9d770639fb31a2b681cfd99e2e (diff) | |
Keep explicit repeats outside primary feedback
Diffstat (limited to 'tests/run.lua')
| -rw-r--r-- | tests/run.lua | 38 |
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 |
