Mercurial > hg
comparison tests/test-minirst.py @ 13011:4936a04b6792
minirst: improved support for option lists.
This enables minirst to parse and print option lists which have both
long and short options. Before, we could only parse option lists with
long options.
author | Erik Zielke <ez@aragost.com> |
---|---|
date | Tue, 02 Nov 2010 17:44:19 +0100 |
parents | 54be08fa4d1d |
children | df47381b41d6 |
comparison
equal
deleted
inserted
replaced
13010:6bdae8ea0b48 | 13011:4936a04b6792 |
---|---|
118 | 118 |
119 options = """ | 119 options = """ |
120 There is support for simple option lists, | 120 There is support for simple option lists, |
121 but only with long options: | 121 but only with long options: |
122 | 122 |
123 --all Output all. | 123 -X, --exclude filter an option with a short and long option with an argument |
124 --both Output both (this description is | 124 -I, --include an option with both a short option and a long option |
125 quite long). | 125 --all Output all. |
126 --long Output all day long. | 126 --both Output both (this description is |
127 | 127 quite long). |
128 --par This option has two paragraphs in its description. | 128 --long Output all day long. |
129 This is the first. | 129 |
130 | 130 --par This option has two paragraphs in its description. |
131 This is the second. Blank lines may be omitted between | 131 This is the first. |
132 options (as above) or left in (as here). | 132 |
133 This is the second. Blank lines may be omitted between | |
134 options (as above) or left in (as here). | |
135 | |
133 | 136 |
134 The next paragraph looks like an option list, but lacks the two-space | 137 The next paragraph looks like an option list, but lacks the two-space |
135 marker after the option. It is treated as a normal paragraph: | 138 marker after the option. It is treated as a normal paragraph: |
136 | 139 |
137 --foo bar baz | 140 --foo bar baz |