aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_test.go')
-rw-r--r--src/testing/testing_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testing/testing_test.go b/src/testing/testing_test.go
index ff674fc3d1..1dd2039399 100644
--- a/src/testing/testing_test.go
+++ b/src/testing/testing_test.go
@@ -293,7 +293,11 @@ func TestChdir(t *testing.T) {
}
defer os.Chdir(oldDir)
- tmp := t.TempDir()
+ // The "relative" test case relies on tmp not being a symlink.
+ tmp, err := filepath.EvalSymlinks(t.TempDir())
+ if err != nil {
+ t.Fatal(err)
+ }
rel, err := filepath.Rel(oldDir, tmp)
if err != nil {
t.Fatal(err)