// 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
// -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.
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
-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.