summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 13:40:00 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 13:40:00 +0200
commitae1c33d38ae1d7ae0a393298d1a92b711ab4d7d7 (patch)
tree2899451d70a5a3f8ef67c3b548cda1dea1a09e39 /tests
parent96890091a63da164c0b907bcb44a03ffe83c6026 (diff)
Preserve stored motion family
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua22
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