diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-10-22 19:42:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-22 13:42:46 +0200 |
commit | 9361938ccdb41d63bab742dbb28587303443e5a4 (patch) | |
tree | bb0d9e259f550fe94d5872b7af585edabb1354c3 /tests/stdlib | |
parent | da0a2fdca20eb48f73fe72d777ec142674debed2 (diff) | |
download | Nim-9361938ccdb41d63bab742dbb28587303443e5a4.tar.gz |
add `std/appdirs` (#20618)
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/tfilesanddirs.nim | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/stdlib/tfilesanddirs.nim b/tests/stdlib/tfilesanddirs.nim index c04f143f6..a1920d4f2 100644 --- a/tests/stdlib/tfilesanddirs.nim +++ b/tests/stdlib/tfilesanddirs.nim @@ -1,4 +1,4 @@ -import std/[paths, files, dirs] +import std/[paths, files, dirs, appdirs] from stdtest/specialpaths import buildDir import std/[syncio, assertions] @@ -21,3 +21,16 @@ block fileOperations: let fh = open(string(dname/file), fmReadWrite) # createFile fh.close() doAssert fileExists(Path(dname/file)) + +block: # getCacheDir + doAssert getCacheDir().dirExists + +block: # moveFile + let tempDir = getTempDir() / Path("D20221022T151608") + createDir(tempDir) + defer: removeDir(tempDir) + +block: # moveDir + let tempDir = getTempDir() / Path("D20220609T161443") + createDir(tempDir) + defer: removeDir(tempDir) |