From 3456c6737eddf04a0dde6b21630f6a0d4c38a37f Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:00:02 +0200 Subject: Emit enabled acquisition prompt --- tests/run.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index 8bc6ba0..5584c50 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -5029,6 +5029,42 @@ test("Interactive acquisition creates enabled direct previews", function() same(nil, macro_service:last_temporary_scope().direct_marker) end) +test("Acquisition emits the exact enabled prompt", function() + fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { + mark_cursor = false, + mark_direct = false, + show_prompt = true, + }, + }) + acquisition_service.new(host):acquire( + "f", + "n", + domain.Position.new(1, 1), + nil, + nil + ) + same("clever-f: ", acquisition_service.PROMPT) + list_same({ "clever-f: " }, host:prompts()) + + fresh_sequence_state() + local macro_host = MemoryHost.new({ + configuration = { + mark_cursor = false, + show_prompt = true, + }, + }) + acquisition_service.new(macro_host):acquire( + "f", + "n", + domain.Position.new(1, 1), + nil, + "q" + ) + same(0, #macro_host:prompts()) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3