Skip to content

Commit

Permalink
test: html golden tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Nov 8, 2024
1 parent 9dd2f6d commit 9eece73
Show file tree
Hide file tree
Showing 89 changed files with 22,432 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ if (MRDOCS_BUILD_TESTS)
endif ()
target_compile_definitions(mrdocs-test PRIVATE -DMRDOCS_TEST_FILES_DIR="${CMAKE_CURRENT_SOURCE_DIR}/test-files")
add_test(NAME mrdocs-unit-tests COMMAND mrdocs-test --unit=true)
foreach (testgenerator IN ITEMS xml adoc)
foreach (testgenerator IN ITEMS xml adoc html)
add_test(NAME mrdocs-golden-tests-${testgenerator}
COMMAND
mrdocs-test
Expand Down
153 changes: 153 additions & 0 deletions test-files/golden-tests/alias-template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
</html>
<head></head>
<body>
<div>
<h1>Reference</h1>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Global namespace</h2>
</div>
<div>
<div>
<h3> Types</h3>
</div>
<div>
<h3>Types</h3>
</div>
</div>
</div>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Class A</h2>

</div>

<div>
<h3>Synopsis</h3>
<div>
<code>
</code>
</div>
<pre class="source-code cpp">
template<typename T>
struct A;
</pre>
</div>

<div>
</div>


</div>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Class B</h2>

</div>

<div>
<h3>Synopsis</h3>
<div>
<code>
</code>
</div>
<pre class="source-code cpp">
template<
typename T,
typename U>
struct B;
</pre>
</div>

<div>
</div>


</div>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>C</h2>

</div>

<div>
<h3>Synopsis</h3>
<div>
<code>
</code>
</div>
<pre class="source-code cpp">
template<typename T>
using C = A<T>;
</pre>
</div>

</div>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Class D</h2>

</div>

<div>
<h3>Synopsis</h3>
<div>
<code>
</code>
</div>
<pre class="source-code cpp">
template<typename T>
struct D;
</pre>
</div>

<div>
<div>
<h3>Types</h3>
</div>
</div>


</div>

[#[object Object]]

<div id="[object Object]">
<div>
<h2><a href="#">D</a>::
E</h2>

</div>

<div>
<h3>Synopsis</h3>
<div>
<code>
</code>
</div>
<pre class="source-code cpp">
template<typename U>
using E = B<T, U>;
</pre>
</div>

</div>
</div>
<div><h4>Created with MrDocs</h4></div>
</body>
</html>
47 changes: 47 additions & 0 deletions test-files/golden-tests/attributes_1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
</html>
<head></head>
<body>
<div>
<h1>Reference</h1>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Global namespace</h2>
</div>
<div>
<div>
<h3> Member Functions</h3>
</div>
</div>
</div>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Function f</h2>

</div>

<div>
<h3>Synopsis</h3>
<div>
<code>
</code>
</div>
<pre class="source-code cpp">
bool
f();
</pre>
</div>




</div>
</div>
<div><h4>Created with MrDocs</h4></div>
</body>
</html>
82 changes: 82 additions & 0 deletions test-files/golden-tests/brief-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
</html>
<head></head>
<body>
<div>
<h1>Reference</h1>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Global namespace</h2>
</div>
<div>
<div>
<h3> Member Functions</h3>
</div>
</div>
</div>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Function f5</h2>
<p><span>brief</span> <b>bold</b> <span>it</span> <span>continues to the line.</span></p>


</div>

<div>
<h3>Synopsis</h3>
<div>
<code>
</code>
</div>
<pre class="source-code cpp">
void
f5();
</pre>
</div>




</div>

[#[object Object]]

<div id="[object Object]">
<div>
<h2>Function f6</h2>
<p><span>brief</span></p>


</div>

<div>
<h3>Synopsis</h3>
<div>
<code>
</code>
</div>
<pre class="source-code cpp">
void
f6();
</pre>
</div>

<div>
<h3>Description</h3>
<p><span>many lined</span> <b>bold</b> <span>what will</span> <span>happen?</span></p>


</div>



</div>
</div>
<div><h4>Created with MrDocs</h4></div>
</body>
</html>
Loading

0 comments on commit 9eece73

Please sign in to comment.