feat(config): add typed module-input fields with defaults
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user