diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-09-29 00:32:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 09:32:39 +0200 |
commit | f061971a9be5222f0f158f605220f3bda42f7488 (patch) | |
tree | f68d36d7e02b4b81055abef8437580247c401154 /tests/js/tos.nim | |
parent | 08cf4cb1e58fad35be3846e98a308500ac2cfdb0 (diff) | |
download | Nim-f061971a9be5222f0f158f605220f3bda42f7488.tar.gz |
envPairs works in vm, nims (#18615)
* envPairs works in vm, nims * fixup
Diffstat (limited to 'tests/js/tos.nim')
-rw-r--r-- | tests/js/tos.nim | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/tests/js/tos.nim b/tests/js/tos.nim index 07eb3aaa3..bfe3cd9b4 100644 --- a/tests/js/tos.nim +++ b/tests/js/tos.nim @@ -1,3 +1,5 @@ +# xxx consider merging this in tests/stdlib/tos.nim for increased coverage (with selecting disabling) + static: doAssert defined(nodejs) import os @@ -19,29 +21,3 @@ block: if not isWindows: doAssert cwd.isAbsolute doAssert relativePath(getCurrentDir() / "foo", "bar") == "../foo" - -import std/sequtils - -template main = - putEnv("foo", "bar") - doAssert getEnv("foo") == "bar" - doAssert existsEnv("foo") - - putEnv("foo", "") - doAssert existsEnv("foo") - putEnv("foo", "bar2") - doAssert getEnv("foo") == "bar2" - - when nimvm: - discard - else: - # need support in vmops: envPairs, delEnv - let s = toSeq(envPairs()) - doAssert ("foo", "bar2") in s - doAssert ("foo", "bar") notin s - - delEnv("foo") - doAssert not existsEnv("foo") - -static: main() -main() |