mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
testing: add -test.example flag to control execution of examples
Also, don't run examples if -test.run is set. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5697069
This commit is contained in:
parent
c7482b9196
commit
5876b4eb28
4 changed files with 23 additions and 2 deletions
|
|
@ -280,7 +280,7 @@ func Main(matchString func(pat, str string) (bool, error), tests []InternalTest,
|
|||
before()
|
||||
startAlarm()
|
||||
testOk := RunTests(matchString, tests)
|
||||
exampleOk := RunExamples(examples)
|
||||
exampleOk := RunExamples(matchString, examples)
|
||||
if !testOk || !exampleOk {
|
||||
fmt.Println("FAIL")
|
||||
os.Exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue