test(11.1-07): planted fixtures and unit tests for fence, execution and name-form holes

- eighteen violation plants pin nested src=, Go aliases, unrun examples, build membership and command forms
- unit tests cover fence collection, captions, goLang, go doc -c, commandWord and Sync
This commit is contained in:
Jakub Zych
2026-10-01 08:45:34 +02:00
parent efc3161c3f
commit 9ba5530ca7
48 changed files with 890 additions and 0 deletions

View File

@@ -150,3 +150,16 @@ func TestHighlightFenceMarkup(t *testing.T) {
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)
}
}
}