diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-09-07 13:13:35 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-09-07 19:21:16 +0200 |
commit | b017138c32df2df2799ebb480bf1b8f5a461d300 (patch) | |
tree | a3efd8d5c91df333fc45f2d8e9f07ae2c6551fa2 /compiler/pathutils.nim | |
parent | 86556ebfdbbd4b8e9edc9d3085ea21d6c0bae2e2 (diff) | |
download | Nim-b017138c32df2df2799ebb480bf1b8f5a461d300.tar.gz |
added a test for 'nim doc'
Diffstat (limited to 'compiler/pathutils.nim')
-rw-r--r-- | compiler/pathutils.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/pathutils.nim b/compiler/pathutils.nim index f84d964bb..b27981159 100644 --- a/compiler/pathutils.nim +++ b/compiler/pathutils.nim @@ -180,7 +180,7 @@ proc relativeTo(full, base: string; sep = DirSep): string = when true: proc eqImpl(x, y: string): bool = when FileSystemCaseSensitive: - result = toLowerAscii(canon x) == toLowerAscii(canon y) + result = cmpIgnoreCase(canon x, canon y) == 0 else: result = canon(x) == canon(y) @@ -251,4 +251,5 @@ when isMainModule and defined(posix): doAssert relativeTo("", "/users/moo") == "" doAssert relativeTo("foo", "") == "foo" - echo string(AbsoluteDir"/Users/me///" / RelativeFile"z.nim") + doAssert AbsoluteDir"/Users/me///" / RelativeFile"z.nim" == AbsoluteFile"/Users/me/z.nim" + doAssert relativeTo("/foo/bar.nim", "/foo/") == "bar.nim" |