From dec674e613fefd0b4cf764f121322dcaa1976031 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 11:56:35 +0200 Subject: Start temporary acquisition scope --- tests/run.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index ce8c1b6..951210a 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -4896,6 +4896,24 @@ test("Acquisition accepts complete initiating action inputs", function() falsy(from_table.macro_state.executing) end) +test("Acquisition starts one temporary resource scope", function() + local service = acquisition_service.new(MemoryHost.new()) + local request = service:acquire( + "f", + "n", + domain.Position.new(1, 1), + 1, + nil + ) + local scope = service:last_temporary_scope() + + truthy(acquisition_service.AcquisitionRequest.is(request)) + truthy(acquisition_service.TemporaryResourceScope.is(scope)) + same(request, scope.request) + truthy(scope.active) + same(1, service:started_scope_count()) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3