diff options
author | Yasuhiro Horimoto <iddqsar888plekww@gmail.com> | 2018-09-30 23:13:16 +0900 |
---|---|---|
committer | Yasuhiro Horimoto <iddqsar888plekww@gmail.com> | 2018-09-30 23:20:14 +0900 |
commit | aa8249d177cbac4a3c08348ea6dbe12d6526928d (patch) | |
tree | d6fbdf43025ad53c14fdfbf1c5db4ee3dcc5e799 /tests | |
parent | 99a874cc8af70db58da0f3e5e00c318488c6c3ea (diff) | |
download | Nim-aa8249d177cbac4a3c08348ea6dbe12d6526928d.tar.gz |
Fix #9126: use splitPath instead of substr
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/tos.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim index 10f439dfa..2c0db6953 100644 --- a/tests/stdlib/tos.nim +++ b/tests/stdlib/tos.nim @@ -43,6 +43,8 @@ true true true true +true +true ''' """ @@ -132,6 +134,18 @@ echo fileExists("../dest/a/b/file.txt") echo fileExists("../dest/a/b/c/fileC.txt") removeDir("../dest") +# test copyDir: +# if separator at the end of a path +createDir("a/b") +open("a/file.txt", fmWrite).close + +copyDir("a/", "../dest/a/") +removeDir("a") + +echo dirExists("../dest/a/b") +echo fileExists("../dest/a/file.txt") +removeDir("../dest") + # Test get/set modification times # Should support at least microsecond resolution import times |