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
142 r""".\" Man page generated from reStructuredText.
144 .TH SIMPLE 1 "2009-08-05" "0.1" "text processing"
146 simple \- The way to go
154 K.I.S.S keep it simple.
161 General rule of life.
165 .BI \-\-config\fB= <file>
166 Read configuration settings from <file>, if it exists.
168 .B \-\-version\fP,\fB \-V
169 Show this program\(aqs version number and exit.
171 .B \-\-help\fP,\fB \-h
172 Show this help message and exit.
181 Admonition with title
198 someone@somewhere.net
200 Arbitrary field: some text
203 .\" Generated by docutils manpage writer.
218 .\\" Man page generated from reStructuredText.
251 .\\" Generated by docutils manpage writer.
256 totest['optiongroup
'] = [
258 optin group with dot as group item
276 .\\" Man page generated from reStructuredText.
282 """optin group with dot as group item
308 .\\" Generated by docutils manpage writer.
312 totest['definitionlist
'] = [
318 :Abstract: Docinfo is required.
325 Description of Term 1 Description of Term 1 Description of Term 1
326 Description of Term 1 Description of Term 1
328 Description of Term 1 Description of Term 1 Description of Term 1
329 Description of Term 1 Description of Term 1
333 .\\" Man page generated from reStructuredText.
335 .TH DEFINITION LIST TEST "" "" ""
337 Definition List Test \\- \n\
346 Description of Term 1 Description of Term 1 Description of Term 1
347 Description of Term 1 Description of Term 1
349 Description of Term 1 Description of Term 1 Description of Term 1
350 Description of Term 1 Description of Term 1
352 .\\" Generated by docutils manpage writer.
357 if __name__ == '__main__
':
359 unittest.main(defaultTest='suite
')