diff options
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 |
