summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
authorAndrey Makarov <ph.makarov@gmail.com>2020-02-23 22:22:46 +0300
committerGitHub <noreply@github.com>2020-02-23 20:22:46 +0100
commit3dad130034e3212159dda5d61988ca2b18959b24 (patch)
tree61b51d8a2305a18ca0e0551fdb30b07e670fc5ee /tests/stdlib
parent13d292786e5a43b23f9a48643744c121c244b6ed (diff)
downloadNim-3dad130034e3212159dda5d61988ca2b18959b24.tar.gz
fix 3 minor bugs in joinPath (see #13455) (#13462) [backport]
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 02a449b8c..15b82fadf 100644
--- a/tests/stdlib/tos.nim
+++ b/tests/stdlib/tos.nim
@@ -361,6 +361,10 @@ block ospaths:
   doAssert joinPath("", "lib") == "lib"
   doAssert joinPath("", "/lib") == unixToNativePath"/lib"
   doAssert joinPath("usr/", "/lib") == unixToNativePath"usr/lib"
+  doAssert joinPath("", "") == unixToNativePath""
+  doAssert joinPath("/" / "") == unixToNativePath"/"
+  doAssert joinPath("/", "/a/b/c") == unixToNativePath"/a/b/c"
+  doAssert joinPath("foo/","") == unixToNativePath"foo/"
 
 block getTempDir:
   block TMPDIR: