summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-02-20 09:08:13 -0800
committerGitHub <noreply@github.com>2021-02-20 18:08:13 +0100
commite94a3e5fcd4f36f090520a859e587c6019ba296b (patch)
tree505109bd9b5ba1815131b64fabb91c8f9ec93703 /tests
parentbd199a8d31a6c93b0bde4526b3f9eb5f677625ce (diff)
downloadNim-e94a3e5fcd4f36f090520a859e587c6019ba296b.tar.gz
move prelude so that `include std/prelude` also works (#17110)
* move prelude so that `include std/prelude` also works

* add test
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tprelude.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/stdlib/tprelude.nim b/tests/stdlib/tprelude.nim
new file mode 100644
index 000000000..a60bcf70a
--- /dev/null
+++ b/tests/stdlib/tprelude.nim
@@ -0,0 +1,14 @@
+discard """
+  targets: "c js"
+  matrix: "; -d:nimTestTpreludeCase1"
+"""
+
+when defined nimTestTpreludeCase1:
+  include std/prelude
+else:
+  include prelude
+
+template main() =
+  doAssert toSeq(1..3) == @[1,2,3]
+static: main()
+main()