summary refs log tree commit diff stats
path: root/tests/misc/t17286.nim
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2022-04-09 23:52:11 +0800
committerGitHub <noreply@github.com>2022-04-09 17:52:11 +0200
commita77ffdb7ea4ec66983d3481cc486c821a5df6b1b (patch)
tree65c05c7985b028c5dae0cfa1cec7fac8ca6eab98 /tests/misc/t17286.nim
parent152dab09838adc5a4ab8dc220c5017c868563467 (diff)
downloadNim-a77ffdb7ea4ec66983d3481cc486c821a5df6b1b.tar.gz
fix #17286 nim check -b:js works (#19704)
* fix #17286 nim check -b:js works

* fix
Diffstat (limited to 'tests/misc/t17286.nim')
-rw-r--r--tests/misc/t17286.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/misc/t17286.nim b/tests/misc/t17286.nim
new file mode 100644
index 000000000..3a54e624e
--- /dev/null
+++ b/tests/misc/t17286.nim
@@ -0,0 +1,16 @@
+discard """
+  cmd: "nim check -b:js $file"
+  action: "compile"
+"""
+
+# bug #17286
+
+import std/compilesettings
+
+static:
+  doAssert querySetting(backend) == "js"
+  doAssert defined(js)
+  doAssert not defined(c)
+
+import random
+randomize()
\ No newline at end of file