summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 13:48:53 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 13:48:53 +0200
commit046e9e4ff39289cfb60141b2d26f1f174b1b5b05 (patch)
tree557a7f1a99417c7776fff78b7659035281dfbe70
parent6c87eb3b6103c638cf76c7509ab2da6bcea67ec8 (diff)
Isolate explicit repeat workflow
-rw-r--r--tests/run.lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 945d712..e5ac940 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -7819,6 +7819,46 @@ test("Explicit repeat actions execute through the resolved motion path", functio
same(2, resolution.invocation.count.value)
end)
+test("Explicit repeats bypass every primary-only coordinator stage", function()
+ local _, transitions = fresh_sequence_state()
+ transitions:BeginAcquisition("n", "F")
+ transitions:CommitAcquiredTarget("n", target("a"), 5)
+ transitions:CommitCommandSuccess("n", domain.Position.new(1, 3), false)
+ local host = MemoryHost.new({
+ buffer_lines = { "ababa" },
+ cursor = { line = 1, byte_column = 3 },
+ fold_open_policy = { "all" },
+ closed_fold_levels = 2,
+ time_values_ms = { 1000 },
+ configuration = {
+ repeat_timeout_ms = 1,
+ mark_char = true,
+ highlight_timeout_ms = 20,
+ },
+ emit_movement_events = false,
+ })
+ local coordinator = sequence_coordinator.new({ host = host })
+
+ local outcome = coordinator:repeat_opposite_direction()
+
+ same(domain.ActionKind.MOVEMENT, outcome.kind)
+ local operations = host:operations()
+ local forbidden = {
+ read_macro_state = true,
+ read_input = true,
+ read_time_ms = true,
+ open_fold = true,
+ create_highlight = true,
+ start_timer = true,
+ }
+ for _, operation in ipairs(operations) do
+ falsy(forbidden[operation.operation] == true, operation.operation)
+ end
+ same(2, host:read_fold_state().closed_levels)
+ same(nil, coordinator:last_primary_resolution())
+ truthy(coordinator:last_explicit_resolution() ~= nil)
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then