summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorTomohiro <gpuppur@gmail.com>2019-10-01 16:09:59 +0900
committerAndreas Rumpf <rumpf_a@web.de>2019-10-01 09:09:59 +0200
commit64d5e2582164a965e05934e9c9b5c371a04f2765 (patch)
tree0cad9fc3ae0d5dde750af77a2e0f347b4d3ac4c0 /tests
parent6dd4cbc3af07eea60e2ae3bd15751bf72e195069 (diff)
downloadNim-64d5e2582164a965e05934e9c9b5c371a04f2765.tar.gz
Fix how `relativePath` handle case sensitiviy (#12312) [backport]
Diffstat (limited to 'tests')
-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 0a264b3fb..ab0cce8de 100644
--- a/tests/stdlib/tos.nim
+++ b/tests/stdlib/tos.nim
@@ -329,6 +329,10 @@ block ospaths:
   doAssert relativePath("/Users/me/bar/z.nim", "/Users/me", '/') == "bar/z.nim"
   doAssert relativePath("", "/users/moo", '/') == ""
   doAssert relativePath("foo", "", '/') == "foo"
+  doAssert relativePath("/foo", "/Foo", '/') == (when FileSystemCaseSensitive: "../foo" else: "")
+  doAssert relativePath("/Foo", "/foo", '/') == (when FileSystemCaseSensitive: "../Foo" else: "")
+  doAssert relativePath("/foo", "/fOO", '/') == (when FileSystemCaseSensitive: "../foo" else: "")
+  doAssert relativePath("/foO", "/foo", '/') == (when FileSystemCaseSensitive: "../foO" else: "")
 
   doAssert joinPath("usr", "") == unixToNativePath"usr/"
   doAssert joinPath("", "lib") == "lib"