cmd/go: show examples with empty output in go test -list

Fixes #21205

Change-Id: I81b001eb42cbf2a5d5b7b82eb63548b22f501be5
Reviewed-on: https://go-review.googlesource.com/52110
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Seiji Takahashi 2017-07-30 21:00:09 +09:00 committed by Ian Lance Taylor
parent f20944de78
commit 6f08c935a9
5 changed files with 63 additions and 1 deletions

View file

@ -970,7 +970,7 @@ func listTests(matchString func(pat, str string) (bool, error), tests []Internal
}
}
for _, example := range examples {
if ok, _ := matchString(*matchList, example.Name); ok && example.Output != "" {
if ok, _ := matchString(*matchList, example.Name); ok {
fmt.Println(example.Name)
}
}