Render imported party rosters as canonical inputs

This commit is contained in:
2026-11-17 22:18:57 +00:00
parent 1657c9f65d
commit 05f5607968
10 changed files with 190 additions and 34 deletions

View File

@@ -1,7 +1,6 @@
package config
import (
"bytes"
"os"
"path/filepath"
"strings"
@@ -53,8 +52,12 @@ inputs:
if cfg.Party.Source.Source != "campaign_config" || cfg.Party.Source.ConfigPath != campaignPath {
t.Fatalf("party provenance = %#v, want campaign source", cfg.Party.Source)
}
if !bytes.Equal(cfg.Party.Canonical.Raw, partyYAML) {
t.Fatal("canonical party bytes were not retained")
canonical, err := cfg.Party.Canonical.YAML()
if err != nil {
t.Fatal(err)
}
if _, err := ParseParty(canonical); err != nil {
t.Fatalf("reload canonical party: %v", err)
}
}