summary refs log tree commit diff stats
path: root/tests/stdlib/tdochelpers.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/tdochelpers.nim')
-rw-r--r--tests/stdlib/tdochelpers.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/stdlib/tdochelpers.nim b/tests/stdlib/tdochelpers.nim
index 0ad49427c..4d532b5d0 100644
--- a/tests/stdlib/tdochelpers.nim
+++ b/tests/stdlib/tdochelpers.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:refc; --mm:orc"
   output: '''
 
 [Suite] Integration with Nim
@@ -9,6 +10,7 @@ discard """
 
 import ../../lib/packages/docutils/[rstast, rst, dochelpers]
 import unittest
+import std/assertions
 
 proc testMsgHandler(filename: string, line, col: int, msgkind: MsgKind,
                     arg: string) =
@@ -201,3 +203,19 @@ suite "Integration with Nim":
                               name: "Copyflag")
     check inputRst.fromRst == expected
     check inputMd.fromMd == expected
+
+  test "prefixed module":
+    let inputRst = "`module std / paths`_"
+    let inputMd = "[module std / paths]"
+    let expected = LangSymbol(symKind: "module",
+                              name: "std/paths")
+    check inputRst.fromRst == expected
+    check inputMd.fromMd == expected
+
+  test "postfixed module":
+    let inputRst = "`std / paths module`_"
+    let inputMd = "[std / paths module]"
+    let expected = LangSymbol(symKind: "module",
+                              name: "std/paths")
+    check inputRst.fromRst == expected
+    check inputMd.fromMd == expected