normalizeExe (#14668)
This commit is contained in:
parent
3cbf59336d
commit
bf604c6829
4 changed files with 28 additions and 10 deletions
|
|
@ -510,3 +510,13 @@ block: # isValidFilename
|
|||
doAssert isValidFilename("ux.bat")
|
||||
doAssert isValidFilename("nim.nim")
|
||||
doAssert isValidFilename("foo.log")
|
||||
|
||||
import sugar
|
||||
|
||||
block: # normalizeExe
|
||||
doAssert "".dup(normalizeExe) == ""
|
||||
when defined(posix):
|
||||
doAssert "foo".dup(normalizeExe) == "./foo"
|
||||
doAssert "foo/../bar".dup(normalizeExe) == "foo/../bar"
|
||||
when defined(windows):
|
||||
doAssert "foo".dup(normalizeExe) == "foo"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue