`
diff --git a/tests/test_build_epub.py b/tests/test_build_epub.py
index f8c1457fa..074e40fb6 100644
--- a/tests/test_build_epub.py
+++ b/tests/test_build_epub.py
@@ -354,6 +354,22 @@ def test_epub_css_files(app):
'href="https://example.com/custom.css" />' not in content)
+@pytest.mark.sphinx('epub', testroot='roles-download')
+def test_html_download_role(app, status, warning):
+ app.build()
+ assert not (app.outdir / '_downloads' / 'dummy.dat').exists()
+
+ content = (app.outdir / 'index.xhtml').text()
+ assert (''
+ 'dummy.dat
' in content)
+ assert (''
+ 'not_found.dat
' in content)
+ assert (''
+ 'Sphinx logo
'
+ ' [http://www.sphinx-doc.org/en/master'
+ '/_static/sphinxheader.png]
' in content)
+
+
@pytest.mark.sphinx('epub')
def test_run_epubcheck(app):
app.build()
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index b8286edb3..51732435e 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -1387,3 +1387,23 @@ def test_html_math_renderer_is_mismatched(make_app, app_params):
assert False
except ConfigError as exc:
assert str(exc) == "Unknown math_renderer 'imgmath' is given."
+
+
+@pytest.mark.sphinx('html', testroot='basic')
+def test_html_pygments_style_default(app):
+ style = app.builder.highlighter.formatter_args.get('style')
+ assert style.__name__ == 'Alabaster'
+
+
+@pytest.mark.sphinx('html', testroot='basic',
+ confoverrides={'pygments_style': 'sphinx'})
+def test_html_pygments_style_manually(app):
+ style = app.builder.highlighter.formatter_args.get('style')
+ assert style.__name__ == 'SphinxStyle'
+
+
+@pytest.mark.sphinx('html', testroot='basic',
+ confoverrides={'html_theme': 'classic'})
+def test_html_pygments_for_classic_theme(app):
+ style = app.builder.highlighter.formatter_args.get('style')
+ assert style.__name__ == 'SphinxStyle'
diff --git a/tests/test_build_html5.py b/tests/test_build_html5.py
index 82050cee1..21da21224 100644
--- a/tests/test_build_html5.py
+++ b/tests/test_build_html5.py
@@ -321,3 +321,23 @@ def test_html5_output(app, cached_etree_parse, fname, expect):
app.build()
print(app.outdir / fname)
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
+
+
+@pytest.mark.sphinx('html', testroot='roles-download',
+ confoverrides={'html_experimental_html5_writer': True})
+def test_html_download_role(app, status, warning):
+ app.build()
+ assert (app.outdir / '_downloads' / 'dummy.dat').exists()
+
+ content = (app.outdir / 'index.html').text()
+ assert (''
+ ''
+ 'dummy.dat
' in content)
+ assert (''
+ 'not_found.dat
' in content)
+ assert (''
+ ''
+ 'Sphinx logo'
+ '
' in content)
diff --git a/tests/test_build_texinfo.py b/tests/test_build_texinfo.py
index 6b6892594..b1fd8c2a9 100644
--- a/tests/test_build_texinfo.py
+++ b/tests/test_build_texinfo.py
@@ -50,6 +50,10 @@ def test_texinfo_warnings(app, status, warning):
def test_texinfo(app, status, warning):
TexinfoTranslator.ignore_missing_images = True
app.builder.build_all()
+ result = (app.outdir / 'SphinxTests.texi').text(encoding='utf8')
+ assert ('@anchor{markup doc}@anchor{12}'
+ '@anchor{markup id1}@anchor{13}'
+ '@anchor{markup testing-various-markup}@anchor{14}' in result)
# now, try to run makeinfo over it
cwd = os.getcwd()
os.chdir(app.outdir)