summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-01-21 06:48:19 -0800
committerAndreas Rumpf <rumpf_a@web.de>2020-01-21 15:48:19 +0100
commitb355ef2a72086126e21187303f1d2d158f52f6a8 (patch)
tree154ae43a2e38b29be56305d508369212eacf9cd1 /tests/stdlib
parentbf96d6d316b4efdb219633947f05b45a5a76620b (diff)
downloadNim-b355ef2a72086126e21187303f1d2d158f52f6a8.tar.gz
fix #13211 relativePath("foo", ".") (#13213)
Diffstat (limited to 'tests/stdlib')
-rw-r--r--tests/stdlib/tos.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim
index 35ea34841..48202157a 100644
--- a/tests/stdlib/tos.nim
+++ b/tests/stdlib/tos.nim
@@ -334,6 +334,10 @@ block ospaths:
   doAssert relativePath("/foo", "/fOO", '/') == (when FileSystemCaseSensitive: "../foo" else: "")
   doAssert relativePath("/foO", "/foo", '/') == (when FileSystemCaseSensitive: "../foO" else: "")
 
+  doAssert relativePath("foo", ".", '/') == "foo"
+  doAssert relativePath(".", ".", '/') == "."
+  doAssert relativePath("..", ".", '/') == ".."
+
   when doslikeFileSystem:
     doAssert relativePath(r"c:\foo.nim", r"C:\") == r"foo.nim"
     doAssert relativePath(r"c:\foo\bar\baz.nim", r"c:\foo") == r"bar\baz.nim"