diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:33:05 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:33:05 +0200 |
| commit | 92ac1334d1362b17b67d6cfc8da9bd526be2bb17 (patch) | |
| tree | eb30b8df5fd1053c94dea555534a06a5eca0ad36 /tests | |
| parent | e695cb4b3a7637edf44058c17f4822bb39e74f6e (diff) | |
Validate primary descriptors
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index b1555c2..aced20a 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -18,6 +18,7 @@ local repeat_resolver = require("clever_f.repeat_resolver") local migemo_catalog = require("clever_f.migemo_catalog") local motion_plan = require("clever_f.motion_plan") local motion_executor = require("clever_f.motion_executor") +local sequence_coordinator = require("clever_f.sequence_coordinator") local sequence_state = require("clever_f.sequence_state") local state_transitions = require("clever_f.state_transitions") local text_topology = require("clever_f.text_topology") @@ -7068,6 +7069,16 @@ test("Eager cleanup preserves history and finalizer registrations", function() same(nil, state.highlight_timer) end) +test("Primary coordination accepts only the four motion descriptors", function() + local coordinator = sequence_coordinator.new({ host = MemoryHost.new() }) + for _, value in ipairs({ "f", "F", "t", "T" }) do + same(domain.Descriptor.from_string(value), coordinator:primary(value)) + end + fails(function() + coordinator:primary("x") + end, "clever-f: Invalid mapping 'x'") +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
