...
1env GO111MODULE=off
2
3# issue 26880: list with tests has wrong variant in imports
4go list -test -f '{{.ImportPath}}:{{with .Imports}} {{join . ", "}}{{end}}' a b
5cmp stdout imports.txt
6
7-- a/a.go --
8package a; import _ "b"
9-- b/b.go --
10package b
11-- b/b_test.go --
12package b
13-- b/b_x_test.go --
14package b_test; import _ "a"
15
16-- imports.txt --
17a: b
18b:
19b.test: b [b.test], b_test [b.test], os, reflect, testing, testing/internal/testdeps
20b [b.test]:
21b_test [b.test]: a [b.test]
View as plain text