Complete bounded glob imports

This commit is contained in:
2026-09-06 20:51:21 +00:00
parent 9f04c09be3
commit 71a73bcfd8
15 changed files with 679 additions and 82 deletions

View File

@@ -18,7 +18,8 @@ type importTestConfig struct {
Nested string `yaml:"nested"`
Second string `yaml:"second"`
} `yaml:"settings"`
Version string `yaml:"version"`
Version string `yaml:"version"`
Items map[string]string `yaml:"items"`
}
func TestLoadTraversesPathImportsDepthFirstAndComposesOrigins(t *testing.T) {
@@ -121,7 +122,6 @@ func TestLoadImportDirectiveValidationAndTemporaryGlobGate(t *testing.T) {
{name: "two targets", body: "_configkit: {imports: [{path: a.yml, glob: '*.yml'}]}\n", code: CodeImportInvalid},
{name: "unknown declaration field", body: "_configkit: {imports: [{path: a.yml, extra: true}]}\n", code: CodeImportInvalid},
{name: "optional kind", body: "_configkit: {imports: [{path: a.yml, optional: 'yes'}]}\n", code: CodeImportInvalid},
{name: "glob gate", body: "_configkit: {imports: [{glob: '*.yml'}]}\n", code: CodeImportUnsupported},
{name: "nested directive", body: "nested: {_configkit: {}}\n", code: CodeImportInvalid},
}
for _, test := range tests {