summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-04-14 13:39:23 +0300
committerGitHub <noreply@github.com>2023-04-14 12:39:23 +0200
commit1a99bcd6abfa41144079e384f35085d79ef20268 (patch)
tree1b1a69f612364b003d25a93ad32ff2ee4fdb2ec1 /tests
parent2a0d8a9a06d7231bc00956de08b802995619b478 (diff)
downloadNim-1a99bcd6abfa41144079e384f35085d79ef20268.tar.gz
runnableExamples imports std/assertions by default (#21658)
closes https://github.com/nim-lang/RFCs/issues/499
Diffstat (limited to 'tests')
-rw-r--r--tests/nimdoc/trunnableexamples.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/nimdoc/trunnableexamples.nim b/tests/nimdoc/trunnableexamples.nim
index 1188cdd1b..1886ceeb3 100644
--- a/tests/nimdoc/trunnableexamples.nim
+++ b/tests/nimdoc/trunnableexamples.nim
@@ -196,6 +196,10 @@ runnableExamples:
   proc fun*()=echo "foo9"
   fun()
 
+# import std/assertions by default
+runnableExamples("-d:nimPreviewSlimSystem"):
+  doAssert true
+
 # note: there are yet other examples where putting runnableExamples at module
 # scope is needed, for example when using an `include` before an `import`, etc.