~ubuntu-branches/ubuntu/jaunty/python-docutils/jaunty

« back to all changes in this revision

Viewing changes to test/test_parsers/test_rst/test_block_quotes.py

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2008-07-24 10:39:53 UTC
  • mfrom: (1.1.4 upstream) (3.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080724103953-8gh4uezg17g9ysgy
Tags: 0.5-2
* Upload docutils 0.5 to unstable
* Update rst.el to upstream Subversion r5596, which apparently fixes
  all its performance problems (17_speed_up_rst_el.dpatch, closes: #474941)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /usr/bin/env python
2
2
 
3
 
# Author: David Goodger
4
 
# Contact: goodger@users.sourceforge.net
5
 
# Revision: $Revision: 4147 $
6
 
# Date: $Date: 2005-12-06 02:06:33 +0100 (Tue, 06 Dec 2005) $
 
3
# $Id: test_block_quotes.py 4564 2006-05-21 20:44:42Z wiemann $
 
4
# Author: David Goodger <goodger@python.org>
7
5
# Copyright: This module has been placed in the public domain.
8
6
 
9
7
"""
218
216
["""\
219
217
Paragraph.
220
218
 
 
219
   Block quote 1.
 
220
 
 
221
   -- Attribution 1
 
222
 
 
223
   Block quote 2.
 
224
 
 
225
   --Attribution 2
 
226
""",
 
227
"""\
 
228
<document source="test data">
 
229
    <paragraph>
 
230
        Paragraph.
 
231
    <block_quote>
 
232
        <paragraph>
 
233
            Block quote 1.
 
234
        <attribution>
 
235
            Attribution 1
 
236
    <block_quote>
 
237
        <paragraph>
 
238
            Block quote 2.
 
239
        <attribution>
 
240
            Attribution 2
 
241
"""],
 
242
["""\
 
243
Paragraph.
 
244
 
 
245
   Block quote 1.
 
246
 
 
247
   -- Attribution 1
 
248
 
 
249
   Block quote 2.
 
250
""",
 
251
"""\
 
252
<document source="test data">
 
253
    <paragraph>
 
254
        Paragraph.
 
255
    <block_quote>
 
256
        <paragraph>
 
257
            Block quote 1.
 
258
        <attribution>
 
259
            Attribution 1
 
260
    <block_quote>
 
261
        <paragraph>
 
262
            Block quote 2.
 
263
"""],
 
264
["""\
 
265
Unindented paragraph.
 
266
 
 
267
    Block quote 1.
 
268
 
 
269
    -- Attribution 1
 
270
 
 
271
    Block quote 2.
 
272
 
 
273
..
 
274
 
 
275
    Block quote 3.
 
276
""",
 
277
"""\
 
278
<document source="test data">
 
279
    <paragraph>
 
280
        Unindented paragraph.
 
281
    <block_quote>
 
282
        <paragraph>
 
283
            Block quote 1.
 
284
        <attribution>
 
285
            Attribution 1
 
286
    <block_quote>
 
287
        <paragraph>
 
288
            Block quote 2.
 
289
    <comment xml:space="preserve">
 
290
    <block_quote>
 
291
        <paragraph>
 
292
            Block quote 3.
 
293
"""],
 
294
["""\
 
295
Paragraph.
 
296
 
221
297
   -- Not an attribution
222
298
 
223
299
Paragraph.
266
342
                                <paragraph>
267
343
                                    and line three
268
344
"""],
 
345
["""\
 
346
Paragraph.
 
347
 
 
348
   -- Not a valid attribution
 
349
 
 
350
   Block quote 1.
 
351
 
 
352
   --Attribution 1
 
353
 
 
354
   --Invalid attribution
 
355
 
 
356
   Block quote 2.
 
357
 
 
358
   --Attribution 2
 
359
""",
 
360
"""\
 
361
<document source="test data">
 
362
    <paragraph>
 
363
        Paragraph.
 
364
    <block_quote>
 
365
        <paragraph>
 
366
            -- Not a valid attribution
 
367
        <paragraph>
 
368
            Block quote 1.
 
369
        <attribution>
 
370
            Attribution 1
 
371
    <block_quote>
 
372
        <paragraph>
 
373
            --Invalid attribution
 
374
        <paragraph>
 
375
            Block quote 2.
 
376
        <attribution>
 
377
            Attribution 2
 
378
"""],
269
379
]
270
380
 
 
381
 
271
382
if __name__ == '__main__':
272
383
    import unittest
273
384
    unittest.main(defaultTest='suite')