From ba398cbb4cdb04ffadf2935a2bb536a1c5105400 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:15:32 +0200 Subject: Make temporary releases idempotent --- tests/run.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index 4139544..4549ab7 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -4466,6 +4466,9 @@ test("Cursor marker overlays the exact cursor byte position", function() truthy(feedback:remove_temporary_overlay(marker)) same(nil, host:highlights()[marker.identity]) same(0, #state:temporary_overlay_identities()) + local operation_count = #host:operations() + falsy(feedback:remove_temporary_overlay(marker)) + same(operation_count, #host:operations()) end) test("Cursor presentation lease restores every prior value", function() @@ -5561,6 +5564,9 @@ test("Acquisition releases direct cursor and presentation resources", function() same(scope.direct_marker.identity, removals[1].identity) same(scope.cursor_marker.identity, removals[2].identity) truthy(restore_index > removals[2].index) + local operation_count = #host:operations() + falsy(scope:release()) + same(operation_count, #host:operations()) end) test("Acquisition cleanup runs from a finally block", function() -- cgit v1.2.3