feat(config): add typed module-input fields with defaults

This commit is contained in:
MDietermann
2026-04-14 08:40:29 +02:00
parent fcc24b99b2
commit ffd18c5382
3 changed files with 166 additions and 4 deletions

View File

@@ -48,6 +48,31 @@ theme_overrides:
}
}
func TestDefaultsCarryModuleInputs(t *testing.T) {
cfg, err := Load("/nonexistent/overlay.yaml")
if err != nil {
t.Fatal(err)
}
if len(cfg.Packages.Base) == 0 {
t.Error("Packages.Base empty")
}
if len(cfg.Fonts) == 0 {
t.Error("Fonts empty")
}
if cfg.ArduinoCLI.Version == "" {
t.Error("ArduinoCLI.Version empty")
}
if cfg.ArduinoCLI.URL == "" {
t.Error("ArduinoCLI.URL empty")
}
if cfg.Zsh.OhMyZshRepo == "" {
t.Error("Zsh.OhMyZshRepo empty")
}
if len(cfg.ShellConfig.Blocks) == 0 {
t.Error("ShellConfig.Blocks empty")
}
}
func TestLoadRejectsUnknownVersion(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, "overlay.yaml")