summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 11:10:50 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 11:10:50 +0200
commit4c3258c8c8ce623a9b6381bd408792d3f713e54a (patch)
treec5f3aed827e0ccb1076a622f7f123ed2a1b9b71b /tests
parent5f7ed814c727f9f1fc0265d46013b0f9c91e8d61 (diff)
Resolve fixed uppercase direction
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 7a77ea2..1609593 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -4042,6 +4042,23 @@ test("Fixed lower-case keys use the lower-case stored form", function()
end
end)
+test("Fixed upper-case keys use the upper-case stored form", function()
+ fresh_sequence_state()
+ local host = MemoryHost.new({
+ configuration = { fix_key_direction = true },
+ })
+ local resolver = repeat_resolver.new({ policy = policy.new(host) })
+
+ for _, stored in ipairs({ "f", "F", "t", "T" }) do
+ for _, pressed in ipairs({ "F", "T" }) do
+ local expected = domain.Descriptor.uppercase(stored)
+ local actual = resolver:resolve_primary_direction(stored, pressed)
+ same(expected, actual, stored .. "/" .. pressed)
+ same(domain.Descriptor.from_string(stored).family, actual.family)
+ end
+ end
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then