summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua11
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