From 571929974ad048d4d6d0322686281e7e5185c13a Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 11 Sep 2021 18:47:24 +0900 Subject: [PATCH] Add a testcase for #9694 --- tests/test_build_manpage.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_build_manpage.py b/tests/test_build_manpage.py index 3680d8651be..e2479e4de77 100644 --- a/tests/test_build_manpage.py +++ b/tests/test_build_manpage.py @@ -23,6 +23,9 @@ def test_all(app, status, warning): assert r'\fBprint \fP\fIi\fP\fB\en\fP' in content assert r'\fBmanpage\en\fP' in content + # heading (title + description) + assert r'sphinxtests \- Sphinx 0.6alpha1' in content + # term of definition list including nodes.strong assert '\n.B term1\n' in content assert '\nterm2 (\\fBstronged partially\\fP)\n' in content @@ -35,6 +38,15 @@ def test_all(app, status, warning): assert 'Footnotes' not in content +@pytest.mark.sphinx('man', testroot='basic', + confoverrides={'man_pages': [('index', 'title', None, [], 1)]}) +def test_man_pages_empty_description(app, status, warning): + app.builder.build_all() + + content = (app.outdir / 'title.1').read_text() + assert r'title \-' not in content + + @pytest.mark.sphinx('man', testroot='basic', confoverrides={'man_make_section_directory': True}) def test_man_make_section_directory(app, status, warning):