From 091970c5514567f8d44c76761f14310ae305ee86 Mon Sep 17 00:00:00 2001 From: Kamil Kisiel Date: Mon, 8 Apr 2013 14:42:06 +1000 Subject: [PATCH] cmd/go: document usage of external test packages Fixes #5144 R=golang-dev, r, dave, adg CC=golang-dev https://golang.org/cl/8171044 --- src/cmd/go/doc.go | 3 +++ src/cmd/go/test.go | 3 +++ 2 files changed, 6 insertions(+) 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. -- 2.50.0