mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
testing: rename cmdline flags to avoid conflicts
Flags defined in the testing package may conflict with real flags defined in the main package, or in any other imported package. This change makes them less likely to be used for other purposes. R=r, rsc, r2 CC=golang-dev https://golang.org/cl/4167055
This commit is contained in:
parent
8ba4df2e9a
commit
6d9db54be5
3 changed files with 13 additions and 13 deletions
|
|
@ -47,8 +47,8 @@ import (
|
|||
)
|
||||
|
||||
// Report as tests are run; default is silent for success.
|
||||
var chatty = flag.Bool("v", false, "verbose: print additional output")
|
||||
var match = flag.String("match", "", "regular expression to select tests to run")
|
||||
var chatty = flag.Bool("test.v", false, "verbose: print additional output")
|
||||
var match = flag.String("test.run", "", "regular expression to select tests to run")
|
||||
|
||||
|
||||
// Insert final newline if needed and tabs after internal newlines.
|
||||
|
|
@ -145,7 +145,7 @@ func Main(matchString func(pat, str string) (bool, os.Error), tests []InternalTe
|
|||
for i := 0; i < len(tests); i++ {
|
||||
matched, err := matchString(*match, tests[i].Name)
|
||||
if err != nil {
|
||||
println("invalid regexp for -match:", err.String())
|
||||
println("invalid regexp for -test.run:", err.String())
|
||||
os.Exit(1)
|
||||
}
|
||||
if !matched {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue