Text file src/cmd/go/testdata/script/list_test_imports.txt

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

View as plain text