aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/alldocs.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2023-06-05 12:38:59 -0400
committerRuss Cox <rsc@golang.org>2023-06-06 19:24:46 +0000
commit0ddd067be6b9a76680a22d97765827e1e98c5ca9 (patch)
tree4fa9a0cf79a6ce630298e48f95994218abbc295f /src/cmd/go/alldocs.go
parent96d8d3eb3294e85972aed190aec1806ef3c30712 (diff)
downloadgo-0ddd067be6b9a76680a22d97765827e1e98c5ca9.tar.gz
go-0ddd067be6b9a76680a22d97765827e1e98c5ca9.zip
cmd/go: document changes to go test -c and -o
This was missing from CL 466397. For #15513. Change-Id: I138b7d76842815f4e702d7fe551aa8968097f75b Reviewed-on: https://go-review.googlesource.com/c/go/+/500955 Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Bypass: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/go/alldocs.go')
-rw-r--r--src/cmd/go/alldocs.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index ccf5605a63..bb28756133 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -1799,9 +1799,9 @@
// the package list (if present) must appear before this flag.
//
// -c
-// Compile the test binary to pkg.test but do not run it
+// Compile the test binary to pkg.test in the current directory but do not run it
// (where pkg is the last element of the package's import path).
-// The file name can be changed with the -o flag.
+// The file name or target directory can be changed with the -o flag.
//
// -exec xprog
// Run the test binary using xprog. The behavior is the same as
@@ -1814,6 +1814,8 @@
// -o file
// Compile the test binary to the named file.
// The test still runs (unless -c or -i is specified).
+// If file ends in a slash or names an existing directory,
+// the test is written to pkg.test in that directory.
//
// The test binary also accepts flags that control execution of the test; these
// flags are also accessible by 'go test'. See 'go help testflag' for details.