From 92ac1334d1362b17b67d6cfc8da9bd526be2bb17 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 13:33:05 +0200 Subject: Validate primary descriptors --- tests/run.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3