mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
* stdlib tests now check refc too * typo * fixes line numbers * disable cpp * do not touch
26 lines
789 B
Nim
26 lines
789 B
Nim
discard """
|
|
matrix: "--mm:refc; --mm:orc"
|
|
"""
|
|
|
|
import std/private/globs
|
|
import std/assertions
|
|
|
|
template main =
|
|
when defined(windows):
|
|
doAssert nativeToUnixPath("C:") == "/C"
|
|
doAssert nativeToUnixPath(r"D:\") == "/D/"
|
|
doAssert nativeToUnixPath(r"E:\a") == "/E/a"
|
|
doAssert nativeToUnixPath(r"E:\a1\") == "/E/a1/"
|
|
doAssert nativeToUnixPath(r"E:\a1\bc") == "/E/a1/bc"
|
|
doAssert nativeToUnixPath(r"\a1\bc") == "/a1/bc"
|
|
doAssert nativeToUnixPath(r"a1\bc") == "a1/bc"
|
|
doAssert nativeToUnixPath("a1") == "a1"
|
|
doAssert nativeToUnixPath("") == ""
|
|
doAssert nativeToUnixPath(".") == "."
|
|
doAssert nativeToUnixPath("..") == ".."
|
|
doAssert nativeToUnixPath(r"..\") == "../"
|
|
doAssert nativeToUnixPath(r"..\..\.\") == "../.././"
|
|
|
|
static: main()
|
|
main()
|