...
1# Tests issue 37971. Check that tests are still loaded even when the package has an error.
2
3go list -e -test d
4cmp stdout want_stdout
5
6go list -e -test -deps d
7stdout golang.org/fake/d
8
9-- want_stdout --
10d
11d.test
12d_test [d.test]
13-- go.mod --
14module d
15
16go 1.16
17-- d.go --
18package d
19
20import "net/http"
21
22const d = http.MethodGet
23func Get() string { return d; }
24-- d2.go --
25-- d_test.go --
26package d_test
27
28import "testing"
29import "golang.org/fake/d"
30func TestD(t *testing.T) { d.Get(); }
View as plain text