summaryrefslogtreecommitdiff
path: root/tests/run.lua
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:15:32 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:15:32 +0200
commitba398cbb4cdb04ffadf2935a2bb536a1c5105400 (patch)
tree9c103a95eb940308771eab1133794d1d6cd2fd3d /tests/run.lua
parent7406476fa093b9af888e82d3cf5c1cc3b320a06f (diff)
Make temporary releases idempotent
Diffstat (limited to 'tests/run.lua')
-rw-r--r--tests/run.lua6
1 files changed, 6 insertions, 0 deletions
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()