Reconcile reuse and inspection with native extraction

This commit is contained in:
2026-11-30 02:20:09 +00:00
parent 52a5d483e3
commit b5b4672920
59 changed files with 515 additions and 2444 deletions

View File

@@ -11,7 +11,7 @@ import (
"golang.org/x/sys/unix"
)
func TestInspectStableInputsRejectsSpellCatalogFIFO(t *testing.T) {
func TestInspectStableInputsRejectsSpeakersFIFO(t *testing.T) {
root := t.TempDir()
sourcePath := filepath.Join(root, "spells.fifo")
if err := unix.Mkfifo(sourcePath, 0o644); err != nil {
@@ -19,16 +19,16 @@ func TestInspectStableInputsRejectsSpellCatalogFIFO(t *testing.T) {
}
cfg := &config.Config{StableInputs: config.ResolvedStableInputs{
SpellCatalogFile: config.ResolvedInputFile{Path: sourcePath, ConfigPath: filepath.Join(root, "campaign.yml")},
SpeakersFile: config.ResolvedInputFile{Path: sourcePath, ConfigPath: filepath.Join(root, "campaign.yml")},
}}
for _, check := range inspectStableInputs(cfg) {
if check.Name != "spell_catalog" {
if check.Name != "speakers" {
continue
}
if check.Err == nil || !strings.Contains(check.Err.Error(), "not a regular file") {
t.Fatalf("spell catalog check = %#v, want regular-file rejection", check)
t.Fatalf("speakers check = %#v, want regular-file rejection", check)
}
return
}
t.Fatal("spell catalog inspection result was not reported")
t.Fatal("speakers inspection result was not reported")
}