4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
8 Tests for the body.py 'line-block' directive.
11 from __init__
import DocutilsTestSupport
14 s
= DocutilsTestSupport
.ParserTestSuite()
15 s
.generateTests(totest
)
20 totest
['line_blocks'] = [
25 Newlines are *preserved*.
26 As is initial whitespace.
29 <document source="test data">
40 As is initial whitespace.
47 This is a line block with options.
50 <document source="test data">
51 <line_block classes="linear" ids="cit-short" names="cit:short">
53 This is a line block with options.
58 Inline markup *may not span
59 multiple lines* of a line block.
62 <document source="test data">
66 <problematic ids="id2" refid="id1">
71 multiple lines* of a line block.
72 <system_message backrefs="id2" ids="id1" level="2" line="3" source="test data" type="WARNING">
74 Inline emphasis start-string without end-string.
80 <document source="test data">
81 <system_message level="3" line="1" source="test data" type="ERROR">
83 Content block expected for the "line-block" directive; none found.
84 <literal_block xml:space="preserve">
90 if __name__
== '__main__':
92 unittest
.main(defaultTest
='suite')