diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index aced20a..6752ae3 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7079,6 +7079,25 @@ test("Primary coordination accepts only the four motion descriptors", function() end, "clever-f: Invalid mapping 'x'") end) +test("Primary coordination reads normalized invocation state", function() + local host = MemoryHost.new({ + mode = "nov", + cursor = { line = 2, byte_column = 4 }, + count = 3, + macro_register = "q", + buffer_lines = { "one", "text" }, + }) + local invocation = sequence_coordinator.new({ host = host }) + :read_primary_invocation() + + same(domain.ModeContext.from_full_mode("no"), invocation.context) + same(domain.Position.new(2, 4), invocation.position) + same(invocation.position, invocation.origin) + same(3, invocation.count.value) + truthy(invocation.macro_state.executing) + same("q", invocation.macro_state.register) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
