diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 36 |
1 files changed, 36 insertions, 0 deletions
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 |
