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