Commit 338185da authored by Andrew Gerrand's avatar Andrew Gerrand

path/filepath: fix TestEvalSymlinks when run under symlinked GOROOT

Fixes #1622.

R=rsc, bradfitzgo
CC=golang-dev
https://golang.org/cl/4287063
parent 19aecba1
......@@ -465,7 +465,11 @@ func TestEvalSymlinks(t *testing.T) {
}
}
// absolute
testroot := filepath.Join(os.Getenv("GOROOT"), "src", "pkg", "path", "filepath")
goroot, err := filepath.EvalSymlinks(os.Getenv("GOROOT"))
if err != nil {
t.Fatalf("EvalSymlinks(%q) error: %v", os.Getenv("GOROOT"), err)
}
testroot := filepath.Join(goroot, "src", "pkg", "path", "filepath")
for _, d := range EvalSymlinksTests {
a := EvalSymlinksTest{
filepath.Join(testroot, d.path),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment