diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 18 |
1 files changed, 18 insertions, 0 deletions
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 |
