diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-03-05 15:31:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 15:31:22 +0100 |
commit | 62c113ebc7ba6fa1594b24158a6cc3e1170f4030 (patch) | |
tree | 37ef86b89836406c30799d91534c1bba9afc20e2 /compiler/pathutils.nim | |
parent | 357edd86b429dfaa3c24dedabdad0eb68915616f (diff) | |
download | Nim-62c113ebc7ba6fa1594b24158a6cc3e1170f4030.tar.gz |
fix #13579 joinPath("/foo/", "../a") is now /a (#13586)
Diffstat (limited to 'compiler/pathutils.nim')
-rw-r--r-- | compiler/pathutils.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/pathutils.nim b/compiler/pathutils.nim index 1c35eb0b2..888e0a572 100644 --- a/compiler/pathutils.nim +++ b/compiler/pathutils.nim @@ -102,6 +102,8 @@ when true: when isMainModule: doAssert AbsoluteDir"/Users/me///" / RelativeFile"z.nim" == AbsoluteFile"/Users/me/z.nim" + doAssert AbsoluteDir"/Users/me" / RelativeFile"../z.nim" == AbsoluteFile"/Users/z.nim" + doAssert AbsoluteDir"/Users/me/" / RelativeFile"../z.nim" == AbsoluteFile"/Users/z.nim" doAssert relativePath("/foo/bar.nim", "/foo/", '/') == "bar.nim" doAssert $RelativeDir"foo/bar" == "foo/bar" doAssert RelativeDir"foo/bar" == RelativeDir"foo/bar" |