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:
15
internal/docsite/testdata/violations/snippet-build-ignored-test-root/modules/demo/demo_test.go
vendored
Normal file
15
internal/docsite/testdata/violations/snippet-build-ignored-test-root/modules/demo/demo_test.go
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package demo
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestGreet(t *testing.T) {
|
||||
// docs:start greet
|
||||
g := Greeter{Name: "blog"}
|
||||
got := g.Greet()
|
||||
// docs:end greet
|
||||
if got != "Hello, blog" {
|
||||
t.Fatalf("Greet() = %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func ignoredOnly() string { return "x" }
|
||||
@@ -0,0 +1,7 @@
|
||||
//go:build ignore
|
||||
|
||||
package demo
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestIgnored(t *testing.T) { _ = ignoredOnly() }
|
||||
Reference in New Issue
Block a user