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