blob: a6ccd26577d1c6975d5edfaf26d61b7b81c7ff79 [file] [log] [blame]
// Copyright 2018 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.
package Main_test
import (
"runtime"
"testing"
)
func TestVGOROOT(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
tg.setenv("GOROOT", "/bad")
tg.runFail("env")
tg.setenv("VGOROOT", runtime.GOROOT())
tg.run("env")
}