mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
* make more standard libraries work with `nimPreviewSlimSystem` * typo * part two * Delete specutils.nim * fixes more tests * more fixes * fixes tests * fixes three more tests * add formatfloat import * fix * last
22 lines
740 B
Nim
22 lines
740 B
Nim
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()
|