From 338185dabb6a0c966e366c56ab89d749d27a33f9 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 21 Mar 2011 11:24:48 +1100 Subject: [PATCH] path/filepath: fix TestEvalSymlinks when run under symlinked GOROOT Fixes #1622. R=rsc, bradfitzgo CC=golang-dev https://golang.org/cl/4287063 --- src/pkg/path/filepath/path_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pkg/path/filepath/path_test.go b/src/pkg/path/filepath/path_test.go index 5c891dee62..2af6e51324 100644 --- a/src/pkg/path/filepath/path_test.go +++ b/src/pkg/path/filepath/path_test.go @@ -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), -- 2.50.0