Files
Error-Code-System/domains/catalog_write_test.go
T
weichen 28d2d50743 Enable canonical versioned Go module consumption
Why: Allow consumers to download an immutable module revision without nested source checkouts or local path replacements.

Evidence: SELF package tests and the prior canonical-path rejection are recorded in the Dev dependency-workspace task card; remote consumption is replayed against the committed candidate.

Impact: Change the module identity and its Go imports while preserving API behavior. Existing historical submodule revisions remain buildable.

Refs: Versioned dependencies U1/U3; feature/dependency-workspace
2026-10-13 15:06:48 +00:00

26 lines
568 B
Go

package domains
import (
"os"
"testing"
"git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git/errcode"
)
func TestWriteCatalog(t *testing.T) {
if os.Getenv("WRITE_CATALOG") != "1" {
t.Skip("set WRITE_CATALOG=1 to regenerate sys.json agent.json squad.json intent.json")
}
r := errcode.NewRegistry()
RegisterAll(r)
for _, domain := range []string{"sys", "agent", "squad", "intent"} {
data, err := ExportDomain(r, domain)
if err != nil {
t.Fatal(err)
}
if err := os.WriteFile(domain+".json", data, 0o644); err != nil {
t.Fatal(err)
}
}
}