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

« back to all changes in this revision

Viewing changes to test/test_transforms/test_substitutions.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: 4233 $
6
 
# Date: $Date: 2005-12-29 00:48:48 +0100 (Thu, 29 Dec 2005) $
 
3
# $Id: test_substitutions.py 4667 2006-07-12 21:40:56Z wiemann $
 
4
# Author: David Goodger <goodger@python.org>
7
5
# Copyright: This module has been placed in the public domain.
8
6
 
9
7
"""
297
295
"""],
298
296
["""\
299
297
Insert an em-dash |---| automatically trimming whitespace.
300
 
Some substitutions |TM| only need trimming on one side.
 
298
Some substitutions |TM| only need |rarrow| trimming on one side.
301
299
 
302
300
.. |---| unicode:: U+02014
303
301
   :trim:
304
302
.. |TM| unicode:: U+02122
305
303
   :ltrim:
 
304
.. |rarrow| unicode:: U+2192
 
305
   :rtrim:
306
306
""",
307
307
u"""\
308
308
<document source="test data">
312
312
        automatically trimming whitespace.
313
313
        Some substitutions
314
314
        \u2122
315
 
         only need trimming on one side.
 
315
         only need \n\
 
316
        \u2192
 
317
        trimming on one side.
316
318
    <substitution_definition ltrim="1" names="---" rtrim="1">
317
319
        \u2014
318
320
    <substitution_definition ltrim="1" names="TM">
319
321
        \u2122
 
322
    <substitution_definition names="rarrow" rtrim="1">
 
323
        \u2192
320
324
"""],
321
325
["""\
322
326
Substitution definition with an illegal element: