aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/path_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/path/filepath/path_test.go')
-rw-r--r--src/path/filepath/path_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/path/filepath/path_test.go b/src/path/filepath/path_test.go
index 1b2a66bc6d..8a66538f6a 100644
--- a/src/path/filepath/path_test.go
+++ b/src/path/filepath/path_test.go
@@ -1980,3 +1980,16 @@ func TestEscaping(t *testing.T) {
}
}
}
+
+func TestEvalSymlinksTooManyLinks(t *testing.T) {
+ testenv.MustHaveSymlink(t)
+ dir := filepath.Join(t.TempDir(), "dir")
+ err := os.Symlink(dir, dir)
+ if err != nil {
+ t.Fatal(err)
+ }
+ _, err = filepath.EvalSymlinks(dir)
+ if err == nil {
+ t.Fatal("expected error, got nil")
+ }
+}