summary refs log tree commit diff stats
path: root/tests/stdlib/tenvvars.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/tenvvars.nim')
-rw-r--r--tests/stdlib/tenvvars.nim10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/stdlib/tenvvars.nim b/tests/stdlib/tenvvars.nim
index b39ce5f72..1a07f02b8 100644
--- a/tests/stdlib/tenvvars.nim
+++ b/tests/stdlib/tenvvars.nim
@@ -1,5 +1,5 @@
 discard """
-  matrix: "--threads:on"
+  matrix: "--mm:refc; --mm:orc"
   joinable: false
   targets: "c js cpp"
 """
@@ -7,6 +7,10 @@ discard """
 import std/envvars
 from std/sequtils import toSeq
 import stdtest/testutils
+import std/[assertions]
+
+when not defined(js):
+  import std/typedthreads
 
 # "LATIN CAPITAL LETTER AE" in UTF-8 (0xc386)
 const unicodeUtf8 = "\xc3\x86"
@@ -45,9 +49,11 @@ template main =
       doAssert not existsEnv("NIM_TESTS_TOSENV_PUT=DUMMY_VALUE")
       doAssert not existsEnv("NIM_TESTS_TOSENV_PUT")
 
+static: main()
 main()
 
 when defined(windows):
+  import std/widestrs
   proc c_wgetenv(env: WideCString): WideCString {.importc: "_wgetenv", header: "<stdlib.h>".}
 proc c_getenv(env: cstring): cstring {.importc: "getenv", header: "<stdlib.h>".}
 
@@ -67,7 +73,7 @@ when not defined(js) and not defined(nimscript):
 
     doAssertRaises(OSError): delEnv("foo=bar")
 
-when defined(windows):
+when defined(windows) and not defined(nimscript):
   import std/encodings
 
   proc c_putenv(env: cstring): int32 {.importc: "putenv", header: "<stdlib.h>".}