5
:Contact: goodger@users.sourceforge.net
6
:Revision: $Revision: 1.5 $
7
:Date: $Date: 2002/05/09 04:13:47 $
8
:Copyright: This module has been placed in the public domain.
13
from __init__ import DocutilsTestSupport
16
s = DocutilsTestSupport.ParserTestSuite()
17
s.generateTests(totest)
22
totest['definition_lists'] = [
30
<definition_list_item>
46
<definition_list_item>
63
<definition_list_item>
69
<system_message level="2" type="WARNING">
71
Definition list ends without a blank line; unexpected unindent at line 3.
77
A literal block without a blank line first?
82
<definition_list_item>
86
<system_message level="1" type="INFO">
88
Blank line missing before literal block? Interpreted as a definition list item. At line 2.
90
A literal block without a blank line first?
94
a term may only be one line long
95
this is not a definition
101
a term may only be one line long
102
<system_message level="3" type="ERROR">
104
Unexpected indentation at line 3.
107
this is not a definition
119
<definition_list_item>
125
<definition_list_item>
134
definition 1 (no blank line below)
141
<definition_list_item>
146
definition 1 (no blank line below)
147
<definition_list_item>
156
definition 1 (no blank line below)
159
No blank line after the definition list.
164
<definition_list_item>
169
definition 1 (no blank line below)
170
<definition_list_item>
176
<system_message level="2" type="WARNING">
178
Definition list ends without a blank line; unexpected unindent at line 5.
180
No blank line after the definition list.
200
<definition_list_item>
207
<definition_list_item>
213
<definition_list_item>
219
<definition_list_item>
230
The ' : ' indicates a classifier in
231
definition list item terms only.
236
<definition_list_item>
243
The ' : ' indicates a classifier in
244
definition list item terms only.
247
Term: not a classifier
248
Because there's no space before the colon.
249
Term :not a classifier
250
Because there's no space after the colon.
251
Term \: not a classifier
252
Because the colon is escaped.
257
<definition_list_item>
259
Term: not a classifier
262
Because there's no space before the colon.
263
<definition_list_item>
265
Term :not a classifier
268
Because there's no space after the colon.
269
<definition_list_item>
271
Term : not a classifier
274
Because the colon is escaped.
277
Term `with *inline ``text **errors : classifier `with *errors ``too
278
Definition `with *inline ``text **markup errors.
283
<definition_list_item>
286
<problematic id="id2" refid="id1">
289
<problematic id="id4" refid="id3">
292
<problematic id="id6" refid="id5">
295
<problematic id="id8" refid="id7">
300
<problematic id="id10" refid="id9">
303
<problematic id="id12" refid="id11">
306
<problematic id="id14" refid="id13">
310
<system_message backrefs="id2" id="id1" level="2" type="WARNING">
312
Inline interpreted text or phrase reference start-string without end-string at line 1.
313
<system_message backrefs="id4" id="id3" level="2" type="WARNING">
315
Inline emphasis start-string without end-string at line 1.
316
<system_message backrefs="id6" id="id5" level="2" type="WARNING">
318
Inline literal start-string without end-string at line 1.
319
<system_message backrefs="id8" id="id7" level="2" type="WARNING">
321
Inline strong start-string without end-string at line 1.
322
<system_message backrefs="id10" id="id9" level="2" type="WARNING">
324
Inline interpreted text or phrase reference start-string without end-string at line 1.
325
<system_message backrefs="id12" id="id11" level="2" type="WARNING">
327
Inline emphasis start-string without end-string at line 1.
328
<system_message backrefs="id14" id="id13" level="2" type="WARNING">
330
Inline literal start-string without end-string at line 1.
333
<problematic id="id16" refid="id15">
336
<problematic id="id18" refid="id17">
339
<problematic id="id20" refid="id19">
342
<problematic id="id22" refid="id21">
345
<system_message backrefs="id16" id="id15" level="2" type="WARNING">
347
Inline interpreted text or phrase reference start-string without end-string at line 2.
348
<system_message backrefs="id18" id="id17" level="2" type="WARNING">
350
Inline emphasis start-string without end-string at line 2.
351
<system_message backrefs="id20" id="id19" level="2" type="WARNING">
353
Inline literal start-string without end-string at line 2.
354
<system_message backrefs="id22" id="id21" level="2" type="WARNING">
356
Inline strong start-string without end-string at line 2.
360
if __name__ == '__main__':
362
unittest.main(defaultTest='suite')