diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:34:33 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:34:33 +0200 |
| commit | d4298233fe294e34c011be7caf318a5fe7046a26 (patch) | |
| tree | b94ab390e11da8e2fc1d39c4fceb0d3ef713c5fd /tests/run.lua | |
| parent | 30f6f516dd8970162d82594934be591cb2c4047f (diff) | |
Open policy-selected folds
Diffstat (limited to 'tests/run.lua')
| -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 fe67fd3..345f146 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7111,6 +7111,24 @@ test("Primary coordination inspects fold policy during preflight", function() truthy(host:read_fold_state():opens("horizontal")) end) +test("Primary preflight opens folds for horizontal and all policies", function() + for _, open_policy in ipairs({ "horizontal", "all" }) do + local host = MemoryHost.new({ + fold_open_policy = { open_policy }, + closed_fold_levels = 2, + }) + sequence_coordinator.new({ host = host }):primary("f") + same(0, host:read_fold_state().closed_levels, open_policy) + end + + local host = MemoryHost.new({ + fold_open_policy = { "jump" }, + closed_fold_levels = 2, + }) + sequence_coordinator.new({ host = host }):primary("f") + same(2, host:read_fold_state().closed_levels) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
