package noscripts import ( "errors" "os" "path/filepath" "testing" ) // The catalogue's checks are Go tests (novox/hq ADR 0529 clause 5, ADR 0445): the checker runs every nested Go module's tests by // the language's convention and no script at the root says what else to run. A script back at the root would be a check nobody // runs (ADR 0503 ยง3: since R4e the checker has not run them), so it is refused. func TestNoScriptOfTheOldCheckStandsAtTheRoot(t *testing.T) { for _, name := range []string{"merge-check.sh", "merge-check-typescript.sh", "check-nested-modules.sh"} { if _, err := os.Stat(filepath.Join("..", "..", name)); !errors.Is(err, os.ErrNotExist) { t.Errorf("%s stands at the catalogue's root (%v): what it ran is a Go test in checks/ or a step of the build module", name, err) } } }