diff options
Diffstat (limited to 'spec/test_profiles.lua')
| -rw-r--r-- | spec/test_profiles.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/test_profiles.lua b/spec/test_profiles.lua index 3a052b9..f2a54a2 100644 --- a/spec/test_profiles.lua +++ b/spec/test_profiles.lua @@ -124,6 +124,22 @@ return { table.concat(found.warnings, " | ")) end }, + { "config roots follow every host layer, in host order", function() + local fake = require("spec.fake_ext") + local paths = require("subagents.paths") + local handle = fake.install() + local ok, err = pcall(function() + local roots = paths.config_roots("workflows") + assert(#roots == 4, "expected one root per layer, saw " .. #roots) + assert(roots[1] == "/data/panto/agent/workflows", roots[1]) + assert(roots[2] == "/home/u/.config/panto/workflows", roots[2]) + assert(roots[3] == "/proj/.panto/workflows", roots[3]) + assert(roots[4] == "/proj/.panto/local/workflows", roots[4]) + end) + handle.restore() + if not ok then error(err, 0) end + end }, + { "the list is sorted by name", function() local found, reason = fixture_or_skip() if not found then |
