mirror of
https://github.com/golang/go
synced 2024-11-18 12:54:44 -07:00
1b22574ddb
A go/build change in Go 1.9 (CL 33158) allowed for a better expected error message for "nonexistingpkg" case. CL 37768 did that. However, that shouldn't be done for Go 1.8 and older, since they don't have the corresponding go/build change. So, if the version is Go 1.8 or older, allow matching those previous expected outputs (before CL 37768) for "nonexistingpkg" case. Move test cases for TestCLI from a package-level variable into TestCLI itself. This is more readable, and isGo19's value is ready in time. Fixes golang/go#20122. Change-Id: I5e80600a75176d9e54ffebb7730849e381568316 Reviewed-on: https://go-review.googlesource.com/41810 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
10 lines
226 B
Go
10 lines
226 B
Go
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build go1.9
|
|
|
|
package main_test
|
|
|
|
func init() { isGo19 = true }
|