summaryrefslogtreecommitdiff
path: root/tests/test_build_manpage.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_build_manpage.py')
-rw-r--r--tests/test_build_manpage.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/test_build_manpage.py b/tests/test_build_manpage.py
index 0a22d3ab6..9b33be757 100644
--- a/tests/test_build_manpage.py
+++ b/tests/test_build_manpage.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""
test_build_manpage
~~~~~~~~~~~~~~~~~~
@@ -8,20 +7,35 @@
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
-from __future__ import print_function
import pytest
+from sphinx.builders.manpage import default_man_pages
+from sphinx.config import Config
+
@pytest.mark.sphinx('man')
def test_all(app, status, warning):
app.builder.build_all()
- assert (app.outdir / 'SphinxTests.1').exists()
+ assert (app.outdir / 'sphinxtests.1').exists()
- content = (app.outdir / 'SphinxTests.1').text()
+ content = (app.outdir / 'sphinxtests.1').text()
assert r'\fBprint \fP\fIi\fP\fB\en\fP' in content
assert r'\fBmanpage\en\fP' in content
# term of definition list including nodes.strong
assert '\n.B term1\n' in content
assert '\nterm2 (\\fBstronged partially\\fP)\n' in content
+
+ assert 'Footnotes' not in content
+
+
+def test_default_man_pages():
+ config = Config({'master_doc': 'index',
+ 'project': 'STASI™ Documentation',
+ 'author': "Wolfgang Schäuble & G'Beckstein",
+ 'release': '1.0'})
+ config.init_values()
+ expected = [('index', 'stasi', 'STASI™ Documentation 1.0',
+ ["Wolfgang Schäuble & G'Beckstein"], 1)]
+ assert default_man_pages(config) == expected