diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index d9fcf26..3537f0a 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7420,6 +7420,28 @@ test("Timely primary repetition resolves live effective direction", function() same(domain.Descriptor.FIND_FORWARD, fixed.effective_descriptor) end) +test("Primary repetition preserves the stored motion family", function() + for _, stored in ipairs({ "f", "F", "t", "T" }) do + for _, pressed in ipairs({ "f", "F", "t", "T" }) do + local _, transitions = fresh_sequence_state() + local landing = domain.Position.new(1, 3) + transitions:BeginAcquisition("n", stored) + transitions:CommitAcquiredTarget("n", target("a")) + transitions:CommitCommandSuccess("n", landing, true) + local host = MemoryHost.new({ + buffer_lines = { "ababa" }, + cursor = landing, + }) + local resolution = sequence_coordinator.new({ host = host }):primary(pressed) + same( + domain.Descriptor.from_string(stored).family, + resolution.effective_descriptor.family, + stored .. "/" .. pressed + ) + end + end +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
