diff options
author | flywind <xzsflywind@gmail.com> | 2021-07-20 21:32:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 15:32:55 +0200 |
commit | a8b3e7c05919511db62f1aabd706c46316b4f7b6 (patch) | |
tree | 89d7d1ba1cfd62ccfb75bc4383138956d72e0f6e /lib | |
parent | dbf8d0b8946419311ac710b1adc995ad206b52c1 (diff) | |
download | Nim-a8b3e7c05919511db62f1aabd706c46316b4f7b6.tar.gz |
follow up #18517 (#18537)
* follow up #18517 * Update lib/pure/os.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/pure/os.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/os.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 6289c64f0..73e3fcb31 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -11,10 +11,11 @@ ## retrieving environment variables, reading command line arguments, ## working with directories, running shell commands, etc. -runnableExamples("-r:off"): +runnableExamples: let myFile = "/path/to/my/file.nim" assert splitPath(myFile) == (head: "/path/to/my", tail: "file.nim") - assert parentDir(myFile) == "/path/to/my" + when defined(posix): + assert parentDir(myFile) == "/path/to/my" assert splitFile(myFile) == (dir: "/path/to/my", name: "file", ext: ".nim") assert myFile.changeFileExt("c") == "/path/to/my/file.c" |