summaryrefslogtreecommitdiff
path: root/tests/run.lua
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:00:21 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:00:21 +0200
commit14bda1fd9623de16b8b9d1cd0dba2433d09ad529 (patch)
tree3b8982b2c632879ca497932f617915ec00f99f95 /tests/run.lua
parent3456c6737eddf04a0dde6b21630f6a0d4c38a37f (diff)
Begin acquisition before input
Diffstat (limited to 'tests/run.lua')
-rw-r--r--tests/run.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 5584c50..cab79c5 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -5065,6 +5065,28 @@ test("Acquisition emits the exact enabled prompt", function()
same(0, #macro_host:prompts())
end)
+test("Acquisition begins sequence state before input", function()
+ local state, transitions = fresh_sequence_state()
+ local host = MemoryHost.new({
+ configuration = { mark_cursor = false },
+ })
+ acquisition_service.new({
+ host = host,
+ transitions = transitions,
+ }):acquire(
+ "T",
+ "nov",
+ domain.Position.new(1, 1),
+ nil,
+ nil
+ )
+
+ local record = state:get_context("no")
+ same(domain.Descriptor.TILL_BACKWARD, record.previous_descriptor)
+ truthy(record.first_move)
+ same(nil, record.previous_target)
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then