os.walkDir: correctly evaluate paths when relative = true (#10057) [backport]

This commit is contained in:
alaviss 2018-12-21 20:12:48 +07:00 • committed by Andreas Rumpf
commit b6257f3f21
2 changed files with 13 additions and 4 deletions

View file

@ -189,6 +189,14 @@ block walkDirRec:
removeDir("walkdir_test")
when not defined(windows):
block walkDirRelative:
createDir("walkdir_test")
createSymlink(".", "walkdir_test/c")
for k, p in walkDir("walkdir_test", true):
doAssert k == pcLinkToDir
removeDir("walkdir_test")
block normalizedPath:
doAssert normalizedPath("") == ""
block relative: