diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-09-27 22:36:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 16:36:31 +0200 |
commit | 4f5c0efaf24e863b26b16d7998eac3bdd830e7be (patch) | |
tree | 4eca358c7eec2f84b7ff2a151276c1184c081a33 /tests/stdlib/tos.nim | |
parent | 821d0806feb3648ced5809a78b07581ea3bd7880 (diff) | |
download | Nim-4f5c0efaf24e863b26b16d7998eac3bdd830e7be.tar.gz |
fixes #24174; allow copyDir and copyDirWithPermissions skipping special files (#24190)
fixes #24174
Diffstat (limited to 'tests/stdlib/tos.nim')
-rw-r--r-- | tests/stdlib/tos.nim | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim index ad34e479a..611659fdb 100644 --- a/tests/stdlib/tos.nim +++ b/tests/stdlib/tos.nim @@ -27,9 +27,8 @@ Raises """ # test os path creation, iteration, and deletion -import os, strutils, pathnorm from stdtest/specialpaths import buildDir -import std/[syncio, assertions] +import std/[syncio, assertions, osproc, os, strutils, pathnorm] block fileOperations: let files = @["these.txt", "are.x", "testing.r", "files.q"] @@ -161,6 +160,18 @@ block fileOperations: # createDir should not fail if `dir` is empty createDir("") + + when defined(linux): # bug #24174 + createDir("a/b") + open("a/file.txt", fmWrite).close + + if not fileExists("a/fifoFile"): + doAssert execCmd("mkfifo -m 600 a/fifoFile") == 0 + + copyDir("a/", "../dest/a/", skipSpecial = true) + copyDirWithPermissions("a/", "../dest2/a/", skipSpecial = true) + removeDir("a") + # Symlink handling in `copyFile`, `copyFileWithPermissions`, `copyFileToDir`, # `copyDir`, `copyDirWithPermissions`, `moveFile`, and `moveDir`. block: |