Fix #3859: manpage: code-block captions are not displayed correctly

This commit is contained in:
Takeshi KOMIYA committed 2019-03-10 12:40:55 +09:00
1 parent f57041ab00
commit fc99687105
3 files changed
+37

No files matched your search

+21
View File
@@ -25,3 +25,24 @@ def test_all(app, status, warning):
# term of definition list including nodes.strong
assert '\n.B term1\n' in content
assert '\nterm2 (\\fBstronged partially\\fP)\n' 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)