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:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user