зеркало из https://github.com/golang/tools.git
go.tools/imports: Permit fix_test.go to work pre-Go 1.4.
LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/156980043
This commit is contained in:
Родитель
70f0e2472d
Коммит
0513cb08b6
|
@ -727,7 +727,13 @@ func TestFindImportGoPath(t *testing.T) {
|
||||||
stdlib = nil
|
stdlib = nil
|
||||||
|
|
||||||
// Test against imaginary bits/bytes package in std lib
|
// Test against imaginary bits/bytes package in std lib
|
||||||
bytesDir := filepath.Join(goroot, "src", "bits", "bytes")
|
bytesDir := filepath.Join(goroot, "src", "pkg", "bits", "bytes")
|
||||||
|
for _, tag := range build.Default.ReleaseTags {
|
||||||
|
// Go 1.4 rearranged the GOROOT tree to remove the "pkg" path component.
|
||||||
|
if tag == "go1.4" {
|
||||||
|
bytesDir = filepath.Join(goroot, "src", "bits", "bytes")
|
||||||
|
}
|
||||||
|
}
|
||||||
if err := os.MkdirAll(bytesDir, 0755); err != nil {
|
if err := os.MkdirAll(bytesDir, 0755); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче