diff options
Diffstat (limited to 'tests/run.lua')
| -rw-r--r-- | tests/run.lua | 17 |
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 |
