...

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

Documentation: cmd/go/testdata/script

     1# This test checks that a "main" package with an external test package
     2# is recompiled only once.
     3# Verifies golang.org/issue/34321.
     4
     5env GO111MODULE=off
     6
     7go list -e -test -deps -f '{{if not .Standard}}{{.ImportPath}}{{end}}' pkg
     8cmp stdout want
     9
    10-- $GOPATH/src/pkg/pkg.go --
    11package main
    12
    13func main() {}
    14
    15-- $GOPATH/src/pkg/pkg_test.go --
    16package main
    17
    18import "testing"
    19
    20func Test(t *testing.T) {}
    21
    22-- want --
    23pkg
    24pkg [pkg.test]
    25pkg.test

View as plain text