Skip to content

Commit

Permalink
Add testing
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Feb 26, 2020
1 parent 5f09f73 commit cbf2bf3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
5 changes: 3 additions & 2 deletions tests/test_sphinx/sourcedirs/includes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
```{include} include1.inc.md
```

{ref}`inc_header`

```{include} include_code.py
:code: python
```
Expand All @@ -18,13 +20,12 @@

```{include} include_literal.txt
:literal:
:name: literal_ref
:start-line: 2
:end-before: lines
:number-lines: 0
```

{ref}`inc_header`

### A Sub-sub-Heading

some more text
16 changes: 8 additions & 8 deletions tests/test_sphinx/test_sphinx_builds/test_includes.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ <h2>
</a>
</p>
</div>
<p>
<a class="reference internal" href="#inc-header">
<span class="std std-ref">
A Sub-Heading in Include
</span>
</a>
</p>
<div class="code python highlight-default notranslate">
<div class="highlight">
<pre><span></span><span class="k">def</span> <span class="nf">a_func</span><span class="p">(</span><span class="n">param</span><span class="p">):</span>
Expand All @@ -68,15 +75,8 @@ <h2>
</pre>
</div>
</div>
<pre class="literal-block"><span class="ln">1 </span>Lots
<pre class="literal-block" id="literal-ref"><span class="ln">1 </span>Lots
<span class="ln">2 </span>of</pre>
<p>
<a class="reference internal" href="#inc-header">
<span class="std std-ref">
A Sub-Heading in Include
</span>
</a>
</p>
<div class="section" id="a-sub-sub-heading">
<h3>
A Sub-sub-Heading
Expand Down
10 changes: 5 additions & 5 deletions tests/test_sphinx/test_sphinx_builds/test_includes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<image candidates="{'*': 'example.jpg'}" uri="example.jpg">
<caption>
Caption
<paragraph>
<pending_xref refdoc="index" refdomain="std" refexplicit="False" reftarget="inc_header" reftype="ref" refwarn="True">
<inline classes="xref std std-ref">
inc_header
<literal_block classes="code python" source="include_code.py" xml:space="preserve">
<inline classes="keyword">
def
Expand Down Expand Up @@ -76,17 +80,13 @@
of
lines
so we can select some
<literal_block source="include_literal.txt" xml:space="preserve">
<literal_block ids="literal-ref" names="literal_ref" source="include_literal.txt" xml:space="preserve">
<inline classes="ln">
1
Lots
<inline classes="ln">
2
of
<paragraph>
<pending_xref refdoc="index" refdomain="std" refexplicit="False" reftarget="inc_header" reftype="ref" refwarn="True">
<inline classes="xref std std-ref">
inc_header
<section ids="a-sub-sub-heading" names="a\ sub-sub-heading">
<title>
A Sub-sub-Heading
Expand Down

0 comments on commit cbf2bf3

Please sign in to comment.