make documentation generator tests green again

This commit is contained in:
Araq 2018-09-13 23:18:51 +02:00
commit 9b29436f62
4 changed files with 11 additions and 6 deletions

2
.gitignore vendored
View file

@ -45,7 +45,7 @@ xcuserdata/
# Generated files. # Generated files.
/compile.json /compile.json
/compiler/nimrod.dot /compiler/nim.dot
/reject.json /reject.json
/run.json /run.json
# for `nim doc foo.nim` # for `nim doc foo.nim`

View file

@ -14,7 +14,7 @@ proc test(dir: string; fixup = false) =
quit("FAILURE: nim buildIndex failed") quit("FAILURE: nim buildIndex failed")
for expected in walkDirRec(dir / "expected/"): for expected in walkDirRec(dir / "expected/"):
let produced = expected.replace("/expected/", "/htmldocs/") let produced = expected.replace('\\', '/').replace("/expected/", "/htmldocs/")
if not fileExists(produced): if not fileExists(produced):
echo "FAILURE: files not found: ", produced echo "FAILURE: files not found: ", produced
inc failures inc failures

View file

@ -1242,7 +1242,8 @@ function main() {
<a class="reference reference-toplevel" href="#7" id="57">Types</a> <a class="reference reference-toplevel" href="#7" id="57">Types</a>
<ul class="simple simple-toc-section"> <ul class="simple simple-toc-section">
<li><a class="reference" href="#SomeType" <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> </ul>
</li> </li>
@ -1264,7 +1265,8 @@ function main() {
<div class="section" id="7"> <div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1> <h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item"> <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> <dd>

View file

@ -1276,8 +1276,11 @@ function main() {
<div id="tocRoot"></div> <div id="tocRoot"></div>
<p class="module-desc">This is the top level module. <p class="module-desc">This is the top level module.
<p><strong class="examples_text">Examples:</strong></p> <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> <pre class="listing"><span class="Keyword">import</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> <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"> <div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1> <h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item"> <dl class="item">