\n```\n\n```go title=x\nx := 1\n```\n"),
})
out := string(renderHTML(t, s, pages["setup/start"]).html)
for _, want := range []string{
`",
`x := 1`,
} {
if !strings.Contains(out, want) {
t.Errorf("missing %s in\n%s", want, out)
}
}
if strings.Contains(out, "") {
t.Error("a fence without src= has a caption")
}
}
func TestGoLang(t *testing.T) {
for _, lang := range []string{"go", "Go", "GO", "golang", "Golang", "main.go"} {
if !goLang(lang) {
t.Errorf("goLang(%q) = false, want true", lang)
}
}
for _, lang := range []string{"go-html-template", "go-text-template", "text", "yaml", "sh", ""} {
if goLang(lang) {
t.Errorf("goLang(%q) = true, want false", lang)
}
}
}