mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-13 17:02:12 -05:00
Fix #3859: manpage: code-block captions are not displayed correctly
This commit is contained in:
1 parent
f57041ab00
commit
fc99687105
3 files changed
+37
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user