INNER CODE UNIT · Go
readRepoFile
minekube/gate · accepted_crypto_doc_test.go:108
func readRepoFile(t *testing.T, path string) string {
t.Helper()
b, err := os.ReadFile(path)
if err != nil {
t.Fatalf("reading %s: %v", path, err)
}
return string(b)
}
// TestAcceptedCryptoRecordNamesEverySite is the record's own content contract: every
// accepted site is named by path and symbol, and the record states why the primitive is
// fixed rather than merely asserting that it is accepted.
func TestAcceptedCryptoRecordNamesEverySite(t *testing.T) {
record := readRepoFile(t, acceptedCryptoDocPath)
for _, site := range acceptedCryptoSites {
if !strings.Contains(record, site.file) {
t.Errorf("%s does not name the site path %s (%s); an unnamed exemption cannot be "+