diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 11:56:35 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 11:56:35 +0200 |
| commit | dec674e613fefd0b4cf764f121322dcaa1976031 (patch) | |
| tree | c1a316b094e3739bb50c1e2fd5040785f1b021ca /tests | |
| parent | 180fdf85a586bb1e43c26d0a8112d2bd82e2b7c8 (diff) | |
Start temporary acquisition scope
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 |
