go/packages: fix tests on 1.10
Can't do module tests on a pre-modules version of Go. Change-Id: I8e3e22d472f37ebc9f930a68c9a6c0f4b7ba7ea0 Reviewed-on: https://go-review.googlesource.com/c/142700 Run-TryBot: Heschi Kreinick <heschi@google.com> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
a0ecdcbec4
commit
5ef16f43e6
|
@ -1138,6 +1138,10 @@ func TestName(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestName_Modules(t *testing.T) {
|
func TestName_Modules(t *testing.T) {
|
||||||
|
if usesOldGolist {
|
||||||
|
t.Skip("pre-modules version of Go")
|
||||||
|
}
|
||||||
|
|
||||||
tmp, cleanup := makeTree(t, map[string]string{
|
tmp, cleanup := makeTree(t, map[string]string{
|
||||||
"src/localmod/go.mod": `module test`,
|
"src/localmod/go.mod": `module test`,
|
||||||
"src/localmod/pkg/pkg.go": `package pkg;`,
|
"src/localmod/pkg/pkg.go": `package pkg;`,
|
||||||
|
@ -1174,6 +1178,10 @@ func TestName_Modules(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestName_ModulesDedup(t *testing.T) {
|
func TestName_ModulesDedup(t *testing.T) {
|
||||||
|
if usesOldGolist {
|
||||||
|
t.Skip("pre-modules version of Go")
|
||||||
|
}
|
||||||
|
|
||||||
tmp, cleanup := makeTree(t, map[string]string{
|
tmp, cleanup := makeTree(t, map[string]string{
|
||||||
"src/localmod/go.mod": `module test`,
|
"src/localmod/go.mod": `module test`,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue