summary refs log tree commit diff stats
path: root/nimdoc
diff options
context:
space:
mode:
Diffstat (limited to 'nimdoc')
-rw-r--r--nimdoc/tester.nim2
-rw-r--r--nimdoc/testproject/expected/subdir/subdir_b/utils.html6
-rw-r--r--nimdoc/testproject/expected/testproject.html7
3 files changed, 10 insertions, 5 deletions
diff --git a/nimdoc/tester.nim b/nimdoc/tester.nim
index 58117987b..e0afe6b94 100644
--- a/nimdoc/tester.nim
+++ b/nimdoc/tester.nim
@@ -14,7 +14,7 @@ proc test(dir: string; fixup = false) =
     quit("FAILURE: nim buildIndex failed")
 
   for expected in walkDirRec(dir / "expected/"):
-    let produced = expected.replace("/expected/", "/htmldocs/")
+    let produced = expected.replace('\\', '/').replace("/expected/", "/htmldocs/")
     if not fileExists(produced):
       echo "FAILURE: files not found: ", produced
       inc failures
diff --git a/nimdoc/testproject/expected/subdir/subdir_b/utils.html b/nimdoc/testproject/expected/subdir/subdir_b/utils.html
index 0e09b10cd..285d09d5c 100644
--- a/nimdoc/testproject/expected/subdir/subdir_b/utils.html
+++ b/nimdoc/testproject/expected/subdir/subdir_b/utils.html
@@ -1242,7 +1242,8 @@ function main() {
   <a class="reference reference-toplevel" href="#7" id="57">Types</a>
   <ul class="simple simple-toc-section">
       <li><a class="reference" href="#SomeType"
-    title="SomeType = int"><wbr />Some<wbr />Type<span class="attachedType" style="visibility:hidden"></span></a></li>
+    title="SomeType = enum
+  enumValueA, enumValueB, enumValueC"><wbr />Some<wbr />Type<span class="attachedType" style="visibility:hidden"></span></a></li>
 
   </ul>
 </li>
@@ -1264,7 +1265,8 @@ function main() {
   <div class="section" id="7">
 <h1><a class="toc-backref" href="#7">Types</a></h1>
 <dl class="item">
-<dt id="SomeType"><a name="SomeType"></a><pre><a href="utils.html#SomeType"><span class="Identifier">SomeType</span></a> <span class="Other">=</span> <span class="Identifier">int</span></pre></dt>
+<dt id="SomeType"><a name="SomeType"></a><pre><a href="utils.html#SomeType"><span class="Identifier">SomeType</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
+  <span class="Identifier">enumValueA</span><span class="Other">,</span> <span class="Identifier">enumValueB</span><span class="Other">,</span> <span class="Identifier">enumValueC</span></pre></dt>
 <dd>
 
 
diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html
index b1f8489f1..784fbe9b7 100644
--- a/nimdoc/testproject/expected/testproject.html
+++ b/nimdoc/testproject/expected/testproject.html
@@ -1276,8 +1276,11 @@ function main() {
   <div id="tocRoot"></div>
   <p class="module-desc">This is the top level module.
 <p><strong class="examples_text">Examples:</strong></p>
-<pre class="listing"><span class="Identifier">doAssert</span> <span class="Identifier">bar</span><span class="Other">(</span><span class="DecNumber">3</span><span class="Other">,</span> <span class="DecNumber">4</span><span class="Other">)</span> <span class="Operator">==</span> <span class="DecNumber">7</span>
-<span class="Identifier">foo</span><span class="Other">(</span><span class="DecNumber">1</span><span class="Other">,</span> <span class="DecNumber">2</span><span class="Other">)</span></pre></p>
+<pre class="listing"><span class="Keyword">import</span>
+  <span class="Identifier">subdir</span> <span class="Operator">/</span> <span class="Identifier">subdir_b</span> <span class="Operator">/</span> <span class="Identifier">utils</span>
+
+<span class="Identifier">doAssert</span> <span class="Identifier">bar</span><span class="Other">(</span><span class="DecNumber">3</span><span class="Other">,</span> <span class="DecNumber">4</span><span class="Other">)</span> <span class="Operator">==</span> <span class="DecNumber">7</span>
+<span class="Identifier">foo</span><span class="Other">(</span><span class="Identifier">enumValueA</span><span class="Other">,</span> <span class="Identifier">enumValueB</span><span class="Other">)</span></pre></p>
   <div class="section" id="6">
 <h1><a class="toc-backref" href="#6">Imports</a></h1>
 <dl class="item">