Website: add template and basic stylesheet with menu. Update buildhtml.py (and theref...
[docutils.git] / sandbox / gitpull / web_stylesheet_and_menu / test / test_parsers / test_rst / test_outdenting.py
blob39ff83c9a44afbd97ed5523be915a58067c79c40
1 #! /usr/bin/env python
3 # $Id$
4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
7 """
8 Tests for states.py.
9 """
11 from __init__ import DocutilsTestSupport
13 def suite():
14 s = DocutilsTestSupport.ParserTestSuite()
15 s.generateTests(totest)
16 return s
18 totest = {}
20 totest['outdenting'] = [
21 ["""\
22 Anywhere a paragraph would have an effect on the current
23 indentation level, a comment or list item should also.
25 + bullet
27 This paragraph ends the bullet list item before a block quote.
29 Block quote.
30 """,
31 """\
32 <document source="test data">
33 <paragraph>
34 Anywhere a paragraph would have an effect on the current
35 indentation level, a comment or list item should also.
36 <bullet_list bullet="+">
37 <list_item>
38 <paragraph>
39 bullet
40 <paragraph>
41 This paragraph ends the bullet list item before a block quote.
42 <block_quote>
43 <paragraph>
44 Block quote.
45 """],
46 ["""\
47 + bullet
49 .. Comments swallow up all indented text following.
51 (Therefore this is not a) block quote.
53 - bullet
55 If we want a block quote after this bullet list item,
56 we need to use an empty comment:
60 Block quote.
61 """,
62 """\
63 <document source="test data">
64 <bullet_list bullet="+">
65 <list_item>
66 <paragraph>
67 bullet
68 <comment xml:space="preserve">
69 Comments swallow up all indented text following.
70 \n\
71 (Therefore this is not a) block quote.
72 <bullet_list bullet="-">
73 <list_item>
74 <paragraph>
75 bullet
76 <paragraph>
77 If we want a block quote after this bullet list item,
78 we need to use an empty comment:
79 <comment xml:space="preserve">
80 <block_quote>
81 <paragraph>
82 Block quote.
83 """],
86 if __name__ == '__main__':
87 import unittest
88 unittest.main(defaultTest='suite')