From aa8249d177cbac4a3c08348ea6dbe12d6526928d Mon Sep 17 00:00:00 2001 From: Yasuhiro Horimoto Date: Sun, 30 Sep 2018 23:13:16 +0900 Subject: Fix #9126: use splitPath instead of substr --- tests/stdlib/tos.nim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') 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 -- cgit 1.4.1-2-gfad0