summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tests/stdlib/tsugar.nim16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/stdlib/tsugar.nim b/tests/stdlib/tsugar.nim
index 5e0c51b2d..c22a8608c 100644
--- a/tests/stdlib/tsugar.nim
+++ b/tests/stdlib/tsugar.nim
@@ -1,4 +1,5 @@
 discard """
+  targets: "c js"
   matrix: "--mm:refc; --mm:orc"
   output: '''
 x + y = 30
@@ -270,17 +271,16 @@ template main() =
         discard collect(newSeq, for i in 1..3: i)
       foo()
 
-proc mainProc() =
   block: # dump
     # symbols in templates are gensym'd
     let
-      x = 10
-      y = 20
+      x {.inject.} = 10
+      y {.inject.} = 20
     dump(x + y) # x + y = 30
 
   block: # dumpToString
     template square(x): untyped = x * x
-    let x = 10
+    let x {.inject.} = 10
     doAssert dumpToString(square(x)) == "square(x): x * x = 100"
     let s = dumpToString(doAssert 1+1 == 2)
     doAssert "failedAssertImpl" in s
@@ -299,8 +299,8 @@ proc mainProc() =
 
     test()
 
-static:
-  main()
-  mainProc()
+when not defined(js): # TODO fixme JS VM
+  static:
+    main()
+
 main()
-mainProc()