Skip to content

Commit d348d46

Browse files
committed
Put SymLinkLoop test into his own test case
1 parent 714a48d commit d348d46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

paths_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
package paths
3131

3232
import (
33+
"fmt"
3334
"os"
3435
"path/filepath"
3536
"runtime"
@@ -278,7 +279,9 @@ func TestReadDirRecursive(t *testing.T) {
278279
pathEqualsTo(t, "_testdata/symlinktofolder/subfolder/file4", list[13])
279280
pathEqualsTo(t, "_testdata/test.txt", list[14])
280281
pathEqualsTo(t, "_testdata/test.txt.gz", list[15])
282+
}
281283

284+
func TestReadDirRecursiveSymLinkLoop(t *testing.T) {
282285
// Test symlink loop
283286
tmp, err := MkTempDir("", "")
284287
require.NoError(t, err)
@@ -290,6 +293,7 @@ func TestReadDirRecursive(t *testing.T) {
290293

291294
l, err := tmp.ReadDirRecursive()
292295
require.Error(t, err)
296+
fmt.Println(err)
293297
require.Nil(t, l)
294298
}
295299

0 commit comments

Comments
 (0)