diff options
author | alaviss <alaviss@users.noreply.github.com> | 2018-10-09 20:37:36 +0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-09 15:37:36 +0200 |
commit | dad290accbd547cbbe0b83592c115b09ed2624f8 (patch) | |
tree | 527d60c7ce8d1b9e74094334014f7527172fcc7a /tests | |
parent | c0266e1afa0cde01d3aca1d717c7200dfb977b86 (diff) | |
download | Nim-dad290accbd547cbbe0b83592c115b09ed2624f8.tar.gz |
os: use unlink() to remove file (#9220)
removeFile() behavior should now be consistant between Windows and POSIX Fixes #9200
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/tos.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim index 2c0db6953..829e35c7b 100644 --- a/tests/stdlib/tos.nim +++ b/tests/stdlib/tos.nim @@ -39,6 +39,7 @@ false true true Raises +Raises true true true @@ -119,6 +120,14 @@ except IOError: echo "Raises" removeFile(dname) +# removeFile should not remove directory +createDir(dname) +try: + removeFile(dname) +except OSError: + echo "Raises" +removeDir(dname) + # test copyDir: createDir("a/b") open("a/b/file.txt", fmWrite).close |