aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/path
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2011-03-21 11:24:48 +1100
committerAndrew Gerrand <adg@golang.org>2011-03-21 11:24:48 +1100
commit338185dabb6a0c966e366c56ab89d749d27a33f9 (patch)
tree892f485ee4d154b4429d0d9762fbff01cd0672d7 /src/pkg/path
parent19aecba1d5ae30411ddb1bc885da33d12d2eafd8 (diff)
downloadgo-338185dabb6a0c966e366c56ab89d749d27a33f9.tar.xz
path/filepath: fix TestEvalSymlinks when run under symlinked GOROOT
Fixes #1622. R=rsc, bradfitzgo CC=golang-dev https://golang.org/cl/4287063
Diffstat (limited to 'src/pkg/path')
-rw-r--r--src/pkg/path/filepath/path_test.go6
1 files changed, 5 insertions, 1 deletions
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),