INNER CODE UNIT · Go
TestClaudeImportsAgents
xo/usql · agents_test.go:22
func TestClaudeImportsAgents(t *testing.T) {
t.Parallel()
info, err := os.Lstat("CLAUDE.md")
if err != nil {
t.Fatal(err)
}
if info.Mode()&os.ModeSymlink != 0 {
t.Fatal("CLAUDE.md is a symbolic link. Make it a file that holds @AGENTS.md. See D1")
}
if got := strings.TrimSpace(readFile(t, "CLAUDE.md")); got != "@AGENTS.md" {
t.Errorf("CLAUDE.md holds %q. It holds only @AGENTS.md, and the rules go in"+
" AGENTS.md. See D1", got)
}
}
// TestTheRootHoldsFourDocuments holds rule 11 of AGENTS.md. A document that
// appears in the root is one nobody filed.
func TestTheRootHoldsFourDocuments(t *testing.T) {