diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:33:32 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:33:32 +0200 |
| commit | 6e69d3d53ee9037dd8bedb1267413937f9a7e817 (patch) | |
| tree | 3e01483ce8631f2c4da6c59cd93702421511ad77 /tests | |
| parent | 92ac1334d1362b17b67d6cfc8da9bd526be2bb17 (diff) | |
Read primary invocation state
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 |
