diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-01-10 11:27:03 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-01-10 11:27:03 +0100 |
commit | 013e11fcc4d023cff8bf987631b669032d253f50 (patch) | |
tree | b812dc969832913066e383d6ecdca5622d028067 /tests/stdlib/tos.nim | |
parent | 3702d1f6c73f2d699587765bb1912d5e2f0d7dde (diff) | |
download | Nim-013e11fcc4d023cff8bf987631b669032d253f50.tar.gz |
add copyDir stdlib test
Diffstat (limited to 'tests/stdlib/tos.nim')
-rw-r--r-- | tests/stdlib/tos.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim index 4df02a9e2..771dc2456 100644 --- a/tests/stdlib/tos.nim +++ b/tests/stdlib/tos.nim @@ -39,6 +39,9 @@ false true true Raises +true +true +true ''' """ # test os path creation, iteration, and deletion @@ -111,3 +114,18 @@ try: except IOError: echo "Raises" removeFile(dname) + +# test copyDir: +createDir("a/b") +open("a/b/file.txt", fmWrite).close +createDir("a/b/c") +open("a/b/c/fileC.txt", fmWrite).close + +copyDir("a", "../dest/a") +removeDir("a") + +echo dirExists("../dest/a/b") +echo fileExists("../dest/a/b/file.txt") + +echo fileExists("../dest/a/b/c/fileC.txt") +removeDir("../dest") |