diff options
| author | grubert <grubert@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2021-04-06 19:50:57 +0000 |
|---|---|---|
| committer | grubert <grubert@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2021-04-06 19:50:57 +0000 |
| commit | 388e9f71675a377332095acce43be7c50400a476 (patch) | |
| tree | 8387f34ddf11adc7bdfdd40e20e78dec56be2bd9 /docutils | |
| parent | 48ac3136c285a9d1a8c442b4f08f6a66658a7d2e (diff) | |
| download | docutils-388e9f71675a377332095acce43be7c50400a476.tar.gz | |
Apply patch #160: move macro defs above .TH (thanks Willie and sorry for the delay).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8669 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
| -rw-r--r-- | docutils/test/functional/expected/standalone_rst_manpage.man | 6 | ||||
| -rw-r--r-- | docutils/test/test_writers/test_manpage.py | 47 |
2 files changed, 30 insertions, 23 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_manpage.man b/docutils/test/functional/expected/standalone_rst_manpage.man index 7a51314d8..c4dd5a6d3 100644 --- a/docutils/test/functional/expected/standalone_rst_manpage.man +++ b/docutils/test/functional/expected/standalone_rst_manpage.man @@ -1,8 +1,5 @@ .\" Man page generated from reStructuredText. . -.TH "RST2MAN" 1 "2006-10-22" "0.1" "text processing" -.SH NAME -rst2man \- generate unix manpages from reStructured text . .nr rst2man-indent-level 0 . @@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. +.TH "RST2MAN" 1 "2006-10-22" "0.1" "text processing" +.SH NAME +rst2man \- generate unix manpages from reStructured text .\" TODO: authors and author with name <email> . .SH SYNOPSIS diff --git a/docutils/test/test_writers/test_manpage.py b/docutils/test/test_writers/test_manpage.py index e429a1adf..655827aba 100644 --- a/docutils/test/test_writers/test_manpage.py +++ b/docutils/test/test_writers/test_manpage.py @@ -55,10 +55,11 @@ totest['blank'] = [ ["", r""".\" Man page generated from reStructuredText. . -.TH "" "" "" "" +"""+indend_macros+ +""".TH "" "" "" "" .SH NAME \- -"""+indend_macros+ +"""+ r""".\" Generated by docutils manpage writer. . """], @@ -71,10 +72,11 @@ r""".\" Generated by docutils manpage writer. """, r""".\" Man page generated from reStructuredText. . -.TH "HELLO, WORLD." "" "" "" +"""+indend_macros+ +""".TH "HELLO, WORLD." "" "" "" .SH NAME Hello, world. \- -"""+indend_macros+ +"""+ r""".sp \fBWARNING:\fP .INDENT 0.0 @@ -147,10 +149,11 @@ and . in a line and at line start """, r""".\" Man page generated from reStructuredText. . -.TH "SIMPLE" 1 "2009-08-05" "0.1" "text processing" +"""+indend_macros+ +""".TH "SIMPLE" 1 "2009-08-05" "0.1" "text processing" .SH NAME simple \- The way to go -"""+indend_macros+ +"""+ r""".SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 @@ -228,11 +231,11 @@ totest['table'] = [ '''\ .\\" Man page generated from reStructuredText. . -.TH "" "" "" "" +'''+indend_macros+ +'''.TH "" "" "" "" .SH NAME \\- \n\ -'''+indend_macros+ -'''.INDENT 0.0 +.INDENT 0.0 .INDENT 3.5 .TS center; @@ -286,11 +289,11 @@ $ """\ .\\" Man page generated from reStructuredText. . -.TH "" "" "" "" +"""+indend_macros+ +""".TH "" "" "" "" .SH NAME \\- \n\ -"""+indend_macros+ -"""optin group with dot as group item +optin group with dot as group item .INDENT 0.0 .TP .B $ @@ -343,10 +346,11 @@ Section '''\ .\\" Man page generated from reStructuredText. . -.TH "DEFINITION LIST TEST" "" "" "" +'''+indend_macros+ +'''.TH "DEFINITION LIST TEST" "" "" "" .SH NAME Definition List Test \\- \n\ -'''+indend_macros+ +'''+ '''.SS Abstract .sp Docinfo is required. @@ -372,10 +376,11 @@ totest['cmdlineoptions'] = [ """, r""".\" Man page generated from reStructuredText. . -.TH "" "" "" "" +"""+indend_macros+ +""".TH "" "" "" "" .SH NAME \- -"""+indend_macros+ +"""+ r""".INDENT 0.0 .TP .B optional arguments: @@ -402,10 +407,11 @@ totest['citation'] = [ """, r""".\" Man page generated from reStructuredText. . -.TH "" "" "" "" +"""+indend_macros+ +""".TH "" "" "" "" .SH NAME \- -"""+indend_macros+ +"""+ r""".IP [docutils] 5 blah blah blah .IP [empty_citation] 5 @@ -422,10 +428,11 @@ totest['rubric'] = [ """, r""".\" Man page generated from reStructuredText. . -.TH "" "" "" "" +"""+indend_macros+ +""".TH "" "" "" "" .SH NAME \- -"""+indend_macros+ +"""+ r"""some rubric .INDENT 0.0 .IP \(bu 2 |
