diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 14:20:51 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 14:20:51 +0200 |
| commit | f44fed2bbf772b63861077dc25b591faa0e39cd7 (patch) | |
| tree | 42307c0bc70b42fc6d5ae1876a24700f99279c58 /tests | |
| parent | 59d83f8ecf982c7b1d3cd5455fd066a880cdb622 (diff) | |
Install default motion mappings
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 4e1649a..d30aea4 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7206,6 +7206,30 @@ test("Core activation checks mapping suppression by sentinel presence", function end end) +test("Core activation installs four default mappings in required modes", function() + fresh_sequence_state() + local host = MemoryHost.new() + local activation = composition_root.new({ host = host }):activate() + local mappings = host:mappings() + + same(4, map_size(activation.mappings)) + for _, expected in ipairs(composition_root.DEFAULT_MAPPINGS) do + local identity = activation.mappings[expected.lhs] + local actual = mappings[identity] + same(expected.lhs, actual.lhs) + same(expected.action, actual.action) + list_same(composition_root.DEFAULT_MAPPING_MODES, actual.modes) + end + + fresh_sequence_state() + local configuration = {} + configuration[policy.DEFAULT_MAP_SUPPRESSION_SENTINEL] = false + local suppressed_host = MemoryHost.new({ configuration = configuration }) + local suppressed = composition_root.new({ host = suppressed_host }):activate() + same(0, map_size(suppressed.mappings)) + same(0, map_size(suppressed_host:mappings())) +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 |
