3 # $Id: test_latex2e.py 6003 2009-06-27 20:44:09Z milde $
4 # Author: engelbert gruber <grubert@users.sourceforge.net>
5 # Copyright: This module has been placed in the public domain.
8 Tests for manpage writer.
11 from __init__
import DocutilsTestSupport
13 from docutils
._compat
import b
17 s
= DocutilsTestSupport
.PublishTestSuite('manpage', suite_settings
=settings
)
18 s
.generateTests(totest
)
22 .nr rst2man-indent-level 0
26 level \\n[rst2man-indent-level]
27 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
34 .\" .rstReportMargin pre
:
36 . nr rst2man
-indent
\\n
[rst2man
-indent
-level
] \\n
[an
-margin
]
37 . nr rst2man
-indent
-level
+1
38 .\" .rstReportMargin post
:
42 .\" indent
\\n
[an
-margin
]
43 .\" old
: \\n
[rst2man
-indent
\\n
[rst2man
-indent
-level
]]
44 .nr rst2man
-indent
-level
-1
45 .\" new
: \\n
[rst2man
-indent
\\n
[rst2man
-indent
-level
]]
46 .in \\n
[rst2man
-indent
\\n
[rst2man
-indent
-level
]]u
54 r""".\" Man page generated
from reStructuredText
.
60 r""".\" Generated by docutils manpage writer
.
67 This broke docutils
-sphinx
.
70 r""".\" Man page generated
from reStructuredText
.
72 .TH HELLO
, WORLD
. "" "" ""
80 This broke docutils\
-sphinx
.
83 .\" Generated by docutils manpage writer
.
98 :Author
: someone
@somewhere.net
100 :Copyright
: public domain
103 :Manual group
: text processing
104 :Arbitrary field
: some text
111 K
.I
.S
.S keep it simple
.
116 General rule of life
.
121 --config
=<file> Read configuration settings
from <file>, if it exists
.
122 --version
, -V Show this program
's version number and exit.
123 --help, -h Show this help message and exit.
132 Admonition with title
137 .. admonition:: homegrown
141 . period at line start.
143 r""".\" Man page generated from reStructuredText.
145 .TH SIMPLE 1 "2009-08-05" "0.1" "text processing"
147 simple \- The way to go
155 K.I.S.S keep it simple.
162 General rule of life.
166 .BI \-\-config\fB= <file>
167 Read configuration settings from <file>, if it exists.
169 .B \-\-version\fP,\fB \-V
170 Show this program\(aqs version number and exit.
172 .B \-\-help\fP,\fB \-h
173 Show this help message and exit.
182 Admonition with title
199 \&. period at line start.
201 someone@somewhere.net
203 Arbitrary field: some text
206 .\" Generated by docutils manpage writer.
221 .\\" Man page generated from reStructuredText.
254 .\\" Generated by docutils manpage writer.
259 totest['optiongroup
'] = [
261 optin group with dot as group item
279 .\\" Man page generated from reStructuredText.
285 """optin group with dot as group item
311 .\\" Generated by docutils manpage writer.
315 totest['definitionlist
'] = [
321 :Abstract: Docinfo is required.
328 Description of Term 1 Description of Term 1 Description of Term 1
329 Description of Term 1 Description of Term 1
331 Description of Term 1 Description of Term 1 Description of Term 1
332 Description of Term 1 Description of Term 1
336 .\\" Man page generated from reStructuredText.
338 .TH DEFINITION LIST TEST "" "" ""
340 Definition List Test \\- \n\
349 Description of Term 1 Description of Term 1 Description of Term 1
350 Description of Term 1 Description of Term 1
352 Description of Term 1 Description of Term 1 Description of Term 1
353 Description of Term 1 Description of Term 1
355 .\\" Generated by docutils manpage writer.
360 if __name__ == '__main__
':
362 unittest.main(defaultTest='suite
')