From: Kamil Kisiel Date: Mon, 8 Apr 2013 04:42:06 +0000 (+1000) Subject: cmd/go: document usage of external test packages X-Git-Tag: go1.1rc2~144 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=091970c5514567f8d44c76761f14310ae305ee86;p=gostls13.git cmd/go: document usage of external test packages Fixes #5144 R=golang-dev, r, dave, adg CC=golang-dev https://golang.org/cl/8171044 --- diff --git a/src/cmd/go/doc.go b/src/cmd/go/doc.go index dcf6612f1f..664d51f257 100644 --- a/src/cmd/go/doc.go +++ b/src/cmd/go/doc.go @@ -398,6 +398,9 @@ the file pattern "*_test.go". These additional files can contain test functions benchmark functions, and example functions. See 'go help testfunc' for more. Each listed package causes the execution of a separate test binary. +Additionally, test files that declare a package with the suffix "_test" will be +compiled and executed separately from the package test binary. + By default, go test needs no arguments. It compiles and tests the package with source in the current directory, including tests, and runs the tests. diff --git a/src/cmd/go/test.go b/src/cmd/go/test.go index 58ebcc0717..babdb18503 100644 --- a/src/cmd/go/test.go +++ b/src/cmd/go/test.go @@ -50,6 +50,9 @@ the file pattern "*_test.go". These additional files can contain test functions benchmark functions, and example functions. See 'go help testfunc' for more. Each listed package causes the execution of a separate test binary. +Additionally, test files that declare a package with the suffix "_test" will be +compiled and executed separately from the package test binary. + By default, go test needs no arguments. It compiles and tests the package with source in the current directory, including tests, and runs the tests.