4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
11 from __init__
import DocutilsTestSupport
14 s
= DocutilsTestSupport
.ParserTestSuite()
15 s
.generateTests(totest
)
20 totest
['line_blocks'] = [
22 | This is a line block.
23 | Line breaks are *preserved*.
25 | This is a second line block.
30 <document source="test data">
41 This is a second line block.
48 | Initial indentation is *also* preserved.
51 <document source="test data">
57 Initial indentation is \n\
63 | Individual lines in line blocks
64 *may* wrap, as indicated by the lack of a vertical bar prefix.
65 | These are called "continuation lines".
68 <document source="test data">
71 Individual lines in line blocks
74 wrap, as indicated by the lack of a vertical bar prefix.
76 These are called "continuation lines".
79 | Inline markup in line blocks may also wrap *to
81 | But not to following lines.
84 <document source="test data">
87 Inline markup in line blocks may also wrap \n\
93 But not to following lines.
96 \\| This is not a line block.
97 The vertical bar is simply part of a paragraph.
100 <document source="test data">
102 | This is not a line block.
103 The vertical bar is simply part of a paragraph.
106 | This line block is incomplete.
107 There should be a blank line before this paragraph.
110 <document source="test data">
113 This line block is incomplete.
114 <system_message level="2" line="2" source="test data" type="WARNING">
116 Line block ends without a blank line.
118 There should be a blank line before this paragraph.
121 | This line block contains
126 <document source="test data">
129 This line block contains
135 | The blank lines in this block
141 <document source="test data">
144 The blank lines in this block
151 | Initial indentation is also significant and preserved:
159 | Continuation lines may be indented less
160 than their base lines.
163 <document source="test data">
166 Initial indentation is also significant and preserved:
185 Continuation lines may be indented less
186 than their base lines.
190 | This block begins and ends with blank lines.
194 <document source="test data">
198 This block begins and ends with blank lines.
206 <document source="test data">
212 | The first line is indented.
213 | The second line is more indented.
216 <document source="test data">
219 The first line is indented.
222 The second line is more indented.
225 | The first line is indented.
226 | The second line is less indented.
229 <document source="test data">
233 The first line is indented.
235 The second line is less indented.
242 |incomplete line block.
245 <document source="test data">
247 <problematic ids="id2" refid="id1">
250 <problematic ids="id4" refid="id3">
253 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
255 Inline substitution_reference start-string without end-string.
256 <system_message backrefs="id4" ids="id3" level="2" line="1" source="test data" type="WARNING">
258 Inline substitution_reference start-string without end-string.
262 <system_message level="2" line="5" source="test data" type="WARNING">
264 Line block ends without a blank line.
266 <problematic ids="id6" refid="id5">
268 incomplete line block.
269 <system_message backrefs="id6" ids="id5" level="2" line="5" source="test data" type="WARNING">
271 Inline substitution_reference start-string without end-string.
274 | Inline markup *may not
275 | wrap* over several lines.
278 <document source="test data">
282 <problematic ids="id2" refid="id1">
286 wrap* over several lines.
287 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
289 Inline emphasis start-string without end-string.
292 | * Block level markup
293 | * is not recognized.
296 <document source="test data">
306 if __name__
== '__main__':
308 unittest
.main(defaultTest
='suite')