Fixes build.
Change-Id: Ia71fc031cc8eb575e5ab5323ff4084147d143744
Reviewed-on: https://go-review.googlesource.com/17867
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
package build
import (
+ "internal/testenv"
"io"
"os"
"path/filepath"
}
func TestImportVendor(t *testing.T) {
+ testenv.MustHaveGoBuild(t) // really must just have source
ctxt := Default
ctxt.GOPATH = ""
p, err := ctxt.Import("golang.org/x/net/http2/hpack", filepath.Join(ctxt.GOROOT, "src/net/http"), AllowVendor)
}
func TestImportVendorFailure(t *testing.T) {
+ testenv.MustHaveGoBuild(t) // really must just have source
ctxt := Default
ctxt.GOPATH = ""
p, err := ctxt.Import("x.com/y/z", filepath.Join(ctxt.GOROOT, "src/net/http"), AllowVendor)