summaryrefslogtreecommitdiff
path: root/tests/test_build_manpage.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-03-10 17:46:12 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-03-10 17:46:12 +0900
commit332dd5d89f7d5f3135006580c5702bb83843d476 (patch)
tree105c17f5e8b6491b73ee2b09e95f2f859bdb5de0 /tests/test_build_manpage.py
parent1aba35f445e254738962e7813097a44906cd56a5 (diff)
parentdb23555f7d707157f15aef4be792f072893a9ea9 (diff)
downloadsphinx-git-332dd5d89f7d5f3135006580c5702bb83843d476.tar.gz
Merge branch '2.0'
Diffstat (limited to 'tests/test_build_manpage.py')
-rw-r--r--tests/test_build_manpage.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_build_manpage.py b/tests/test_build_manpage.py
index 663db8439..17a2f7eb8 100644
--- a/tests/test_build_manpage.py
+++ b/tests/test_build_manpage.py
@@ -30,6 +30,27 @@ def test_all(app, status, warning):
assert 'Footnotes' not in content
+@pytest.mark.sphinx('man', testroot='directive-code')
+def test_captioned_code_block(app, status, warning):
+ app.builder.build_all()
+ content = (app.outdir / 'python.1').text()
+
+ assert ('.sp\n'
+ 'caption \\fItest\\fP rb\n'
+ '.INDENT 0.0\n'
+ '.INDENT 3.5\n'
+ '.sp\n'
+ '.nf\n'
+ '.ft C\n'
+ 'def ruby?\n'
+ ' false\n'
+ 'end\n'
+ '.ft P\n'
+ '.fi\n'
+ '.UNINDENT\n'
+ '.UNINDENT\n' in content)
+
+
def test_default_man_pages():
config = Config({'project': 'STASI™ Documentation',
'author': "Wolfgang Schäuble & G'Beckstein",