mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-20 16:01:29 +00:00
Update tests/js/tos.nim, make isAbsolute tested on nodejs under Windows. (#23377)
Windows's nodejs `isAbsolute` issue has been resolved by [this PR](https://github.com/nim-lang/Nim/pull/23365). So we can improve the coverage for Windows.
This commit is contained in:
@@ -13,11 +13,9 @@ block:
|
||||
doAssert not "foo".isAbsolute
|
||||
doAssert relativePath("", "bar") == ""
|
||||
doAssert normalizedPath(".///foo//./") == "foo"
|
||||
let cwd = getCurrentDir()
|
||||
|
||||
let isWindows = '\\' in cwd
|
||||
# defined(windows) doesn't work with -d:nodejs but should
|
||||
# these actually break because of that (see https://github.com/nim-lang/Nim/issues/13469)
|
||||
if not isWindows:
|
||||
when nimvm: discard
|
||||
else:
|
||||
let cwd = getCurrentDir()
|
||||
doAssert cwd.isAbsolute
|
||||
doAssert relativePath(getCurrentDir() / "foo", "bar") == "../foo"
|
||||
doAssert relativePath(getCurrentDir() / "foo", "bar") == ".." / "foo"
|
||||
|
||||
Reference in New Issue
Block a user