summaryrefslogtreecommitdiff
path: root/tests/test_build_html.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_build_html.py')
-rw-r--r--tests/test_build_html.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index 1a717f152..fa0bbac7c 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -1598,8 +1598,21 @@ def test_html_scaled_image_link(app):
context)
-@pytest.mark.sphinx('html', testroot='reST-code-block')
-def test_html_codeblock_linenos_style(app):
+@pytest.mark.sphinx('html', testroot='reST-code-block',
+ confoverrides={'html_codeblock_linenos_style': 'table'})
+def test_html_codeblock_linenos_style_table(app):
+ app.build()
+ content = (app.outdir / 'index.html').read_text(encoding='utf8')
+
+ assert ('<div class="linenodiv"><pre><span class="normal">1</span>\n'
+ '<span class="normal">2</span>\n'
+ '<span class="normal">3</span>\n'
+ '<span class="normal">4</span></pre></div>') in content
+
+
+@pytest.mark.sphinx('html', testroot='reST-code-block',
+ confoverrides={'html_codeblock_linenos_style': 'inline'})
+def test_html_codeblock_linenos_style_inline(app):
app.build()
content = (app.outdir / 'index.html').read_text(encoding='utf8')