diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 03e1c2d..2b54ff1 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -6045,6 +6045,30 @@ test("Operator acquisition keeps feedback temporary", function() same(0, map_size(host:highlights())) end) +test("Persistent feedback stores overlay identity and anchor", function() + local state, transitions = fresh_sequence_state() + local host = MemoryHost.new({ buffer_lines = { "x", "axa" } }) + local feedback = feedback_service.new({ + host = host, + transitions = transitions, + }) + local shared_target = target_plan.build(target("a"), matching_policy()) + local movement = motion_plan.build(shared_target, "f") + local persistent = feedback:request_persistent({ + context = "n", + anchor = domain.Position.new(2, 2), + target_plan = shared_target, + motion_plan = movement, + window = "window-anchor", + }) + local resource = state.target_overlays[1] + + same(persistent.identity, resource.identity) + same("window-anchor", resource.window) + same("CleverFChar", resource.group) + same(2, resource.anchor_line) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
