Skip to content

Commit 5719299

Browse files
committed
Add a testcase for #9694
1 parent d0e014b commit 5719299

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_build_manpage.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def test_all(app, status, warning):
2323
assert r'\fBprint \fP\fIi\fP\fB\en\fP' in content
2424
assert r'\fBmanpage\en\fP' in content
2525

26+
# heading (title + description)
27+
assert r'sphinxtests \- Sphinx <Tests> 0.6alpha1' in content
28+
2629
# term of definition list including nodes.strong
2730
assert '\n.B term1\n' in content
2831
assert '\nterm2 (\\fBstronged partially\\fP)\n' in content
@@ -35,6 +38,15 @@ def test_all(app, status, warning):
3538
assert 'Footnotes' not in content
3639

3740

41+
@pytest.mark.sphinx('man', testroot='basic',
42+
confoverrides={'man_pages': [('index', 'title', None, [], 1)]})
43+
def test_man_pages_empty_description(app, status, warning):
44+
app.builder.build_all()
45+
46+
content = (app.outdir / 'title.1').read_text()
47+
assert r'title \-' not in content
48+
49+
3850
@pytest.mark.sphinx('man', testroot='basic',
3951
confoverrides={'man_make_section_directory': True})
4052
def test_man_make_section_directory(app, status, warning):

0 commit comments

Comments
 (0)