mirror of
https://github.com/golang/go
synced 2024-11-24 08:50:14 -07:00
undo CL 107320046 / 97cd07dcb9d8
Breaks the build ««« original CL description cmd/go: build test files containing non-runnable examples Even if we can't run them, we should at least check that they compile. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/107320046 »»» TBR=rsc R=rsc CC=golang-codereviews https://golang.org/cl/110140044
This commit is contained in:
parent
280eb703a2
commit
da1c2b182a
@ -1177,12 +1177,12 @@ func (t *testFuncs) load(filename, pkg string, seen *bool) error {
|
||||
ex := doc.Examples(f)
|
||||
sort.Sort(byOrder(ex))
|
||||
for _, e := range ex {
|
||||
*seen = true // Build the file even if the example is not runnable.
|
||||
if e.Output == "" && !e.EmptyOutput {
|
||||
// Don't run examples with no output.
|
||||
continue
|
||||
}
|
||||
t.Examples = append(t.Examples, testFunc{pkg, "Example" + e.Name, e.Output})
|
||||
*seen = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user