summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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