diff options
author | Andrey Makarov <ph.makarov@gmail.com> | 2022-10-28 11:01:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 10:01:28 +0200 |
commit | 779b1cc5beefa6064cb640401f1969c95a96c205 (patch) | |
tree | f2f90b81d95cd8d1aa64236dd053cb34dab95ccc /tests/stdlib | |
parent | e68a6ea759c65ec2ec92cfe5ef922c5c3ef0623e (diff) | |
download | Nim-779b1cc5beefa6064cb640401f1969c95a96c205.tar.gz |
Fix #20628 for Windows (#20667)
* Fix #20628 for Windows * Move isRegular - !isSpecial and onlyRegular - skipSpecial * Forgot to change it in 1 more place
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/tgetfileinfo.nim | 14 | ||||
-rw-r--r-- | tests/stdlib/tos.nim | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/stdlib/tgetfileinfo.nim b/tests/stdlib/tgetfileinfo.nim index f08f59d87..d0413f757 100644 --- a/tests/stdlib/tgetfileinfo.nim +++ b/tests/stdlib/tgetfileinfo.nim @@ -127,11 +127,11 @@ proc testGetFileInfo = echo pcLinkToDir echo pcLinkToFile - doAssert dirInfo.isRegular == true - doAssert fileInfo.isRegular == true + doAssert dirInfo.isSpecial == false + doAssert fileInfo.isSpecial == false when defined(posix): - doAssert linkDirInfo.isRegular == true - doAssert linkFileInfo.isRegular == true + doAssert linkDirInfo.isSpecial == false + doAssert linkFileInfo.isSpecial == false removeDir(dirPath) removeFile(filePath) @@ -139,7 +139,7 @@ proc testGetFileInfo = removeFile(linkDirPath) removeFile(linkFilePath) - # Test that `isRegular` is set correctly + # Test that `isSpecial` is set correctly block: when defined(posix): let @@ -154,8 +154,8 @@ proc testGetFileInfo = fifoInfo = getFileInfo(fifoPath) linkFifoInfo = getFileInfo(linkFifoPath) - doAssert fifoInfo.isRegular == false - doAssert linkFifoInfo.isRegular == false + doAssert fifoInfo.isSpecial == true + doAssert linkFifoInfo.isSpecial == true removeFile(fifoPath) removeFile(linkFifoPath) diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim index 2ade042ae..b2891ef1b 100644 --- a/tests/stdlib/tos.nim +++ b/tests/stdlib/tos.nim @@ -361,7 +361,7 @@ block: # walkDir removeDir("walkdir_test") when defined(posix): - block walkDirRegular: + block walkDirSpecial: createDir("walkdir_test") doAssert execShellCmd("mkfifo walkdir_test/fifo") == 0 createSymlink("fifo", "walkdir_test/fifo_link") @@ -370,9 +370,9 @@ block: # walkDir (pcFile, "fifo") in withSpecialFiles and (pcLinkToFile, "fifo_link") in withSpecialFiles) # now Unix special files are excluded from walkdir output: - let onlyRegularFiles = toSeq(walkDir("walkdir_test", relative = true, - onlyRegular = true)) - doAssert onlyRegularFiles.len == 0 + let skipSpecialFiles = toSeq(walkDir("walkdir_test", relative = true, + skipSpecial = true)) + doAssert skipSpecialFiles.len == 0 removeDir("walkdir_test") block normalizedPath: |