3
# Author: David Goodger
4
# Contact: goodger@python.org
5
# Revision: $Revision: 3129 $
6
# Date: $Date: 2005-03-26 17:21:28 +0100 (Sat, 26 Mar 2005) $
7
# 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['line_blocks'] = [
24
| This is a line block.
25
| Line breaks are *preserved*.
27
| This is a second line block.
32
<document source="test data">
43
This is a second line block.
50
| Initial indentation is *also* preserved.
53
<document source="test data">
59
Initial indentation is \n\
65
| Individual lines in line blocks
66
*may* wrap, as indicated by the lack of a vertical bar prefix.
67
| These are called "continuation lines".
70
<document source="test data">
73
Individual lines in line blocks
76
wrap, as indicated by the lack of a vertical bar prefix.
78
These are called "continuation lines".
81
| Inline markup in line blocks may also wrap *to
83
| But not to following lines.
86
<document source="test data">
89
Inline markup in line blocks may also wrap \n\
95
But not to following lines.
98
\\| This is not a line block.
99
The vertical bar is simply part of a paragraph.
102
<document source="test data">
104
| This is not a line block.
105
The vertical bar is simply part of a paragraph.
108
| This line block is incomplete.
109
There should be a blank line before this paragraph.
112
<document source="test data">
115
This line block is incomplete.
116
<system_message level="2" line="2" source="test data" type="WARNING">
118
Line block ends without a blank line.
120
There should be a blank line before this paragraph.
123
| This line block contains
128
<document source="test data">
131
This line block contains
137
| The blank lines in this block
143
<document source="test data">
146
The blank lines in this block
153
| Initial indentation is also significant and preserved:
161
| Continuation lines may be indented less
162
than their base lines.
165
<document source="test data">
168
Initial indentation is also significant and preserved:
187
Continuation lines may be indented less
188
than their base lines.
192
| This block begins and ends with blank lines.
196
<document source="test data">
200
This block begins and ends with blank lines.
208
<document source="test data">
214
| The first line is indented.
215
| The second line is more indented.
218
<document source="test data">
221
The first line is indented.
224
The second line is more indented.
227
| The first line is indented.
228
| The second line is less indented.
231
<document source="test data">
235
The first line is indented.
237
The second line is less indented.
244
|incomplete line block.
247
<document source="test data">
249
<problematic ids="id2" refid="id1">
252
<problematic ids="id4" refid="id3">
255
<system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
257
Inline substitution_reference start-string without end-string.
258
<system_message backrefs="id4" ids="id3" level="2" line="1" source="test data" type="WARNING">
260
Inline substitution_reference start-string without end-string.
264
<system_message level="2" line="5" source="test data" type="WARNING">
266
Line block ends without a blank line.
268
<problematic ids="id6" refid="id5">
270
incomplete line block.
271
<system_message backrefs="id6" ids="id5" level="2" line="5" source="test data" type="WARNING">
273
Inline substitution_reference start-string without end-string.
276
| Inline markup *may not
277
| wrap* over several lines.
280
<document source="test data">
284
<problematic ids="id2" refid="id1">
288
wrap* over several lines.
289
<system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
291
Inline emphasis start-string without end-string.
294
| * Block level markup
295
| * is not recognized.
298
<document source="test data">
308
if __name__ == '__main__':
310
unittest.main(defaultTest='suite')