diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:00:02 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:00:02 +0200 |
| commit | 3456c6737eddf04a0dde6b21630f6a0d4c38a37f (patch) | |
| tree | 33e1a9fd9a562abd5d2dc30af985d059a2715812 /tests/run.lua | |
| parent | 916592836fd92dbb7d6c498c26ffd83fa290384e (diff) | |
Emit enabled acquisition prompt
Diffstat (limited to 'tests/run.lua')
| -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 |
