~ubuntu-branches/ubuntu/hardy/python-docutils/hardy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): martin f. krafft
  • Date: 2006-07-10 11:45:05 UTC
  • mfrom: (2.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20060710114505-otkhqcslevewxmz5
Tags: 0.4-3
Added build dependency on python-central (closes: #377580).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
# Author: David Goodger
4
4
# Contact: goodger@users.sourceforge.net
5
 
# Revision: $Revision: 1.8 $
6
 
# Date: $Date: 2004/03/23 23:43:52 $
 
5
# Revision: $Revision: 3129 $
 
6
# Date: $Date: 2005-03-26 17:21:28 +0100 (Sat, 26 Mar 2005) $
7
7
# Copyright: This module has been placed in the public domain.
8
8
 
9
9
"""
25
25
""",
26
26
"""\
27
27
<document source="test data">
28
 
    <footnote id="id1" name="1">
 
28
    <footnote ids="id1" names="1">
29
29
        <label>
30
30
            1
31
31
        <paragraph>
37
37
""",
38
38
"""\
39
39
<document source="test data">
40
 
    <footnote id="id1" name="1">
 
40
    <footnote ids="id1" names="1">
41
41
        <label>
42
42
            1
43
43
        <paragraph>
53
53
""",
54
54
"""\
55
55
<document source="test data">
56
 
    <footnote id="id1" name="1">
 
56
    <footnote ids="id1" names="1">
57
57
        <label>
58
58
            1
59
59
        <paragraph>
60
60
            This is a footnote
61
61
            on multiple lines with more space.
62
 
    <footnote id="id2" name="2">
 
62
    <footnote ids="id2" names="2">
63
63
        <label>
64
64
            2
65
65
        <paragraph>
73
73
""",
74
74
"""\
75
75
<document source="test data">
76
 
    <footnote id="id1" name="1">
 
76
    <footnote ids="id1" names="1">
77
77
        <label>
78
78
            1
79
79
        <paragraph>
87
87
""",
88
88
"""\
89
89
<document source="test data">
90
 
    <footnote id="id1" name="1">
 
90
    <footnote ids="id1" names="1">
91
91
        <label>
92
92
            1
93
93
    <paragraph>
99
99
""",
100
100
"""\
101
101
<document source="test data">
102
 
    <footnote id="id1" name="1">
 
102
    <footnote ids="id1" names="1">
103
103
        <label>
104
104
            1
105
105
    <system_message level="2" line="2" source="test data" type="WARNING">
124
124
"""\
125
125
<document source="test data">
126
126
    <paragraph>
127
 
        <footnote_reference auto="1" id="id1">
 
127
        <footnote_reference auto="1" ids="id1">
128
128
         is the first auto-numbered footnote reference.
129
 
        <footnote_reference auto="1" id="id2">
 
129
        <footnote_reference auto="1" ids="id2">
130
130
         is the second auto-numbered footnote reference.
131
 
    <footnote auto="1" id="id3">
 
131
    <footnote auto="1" ids="id3">
132
132
        <paragraph>
133
133
            Auto-numbered footnote 1.
134
 
    <footnote auto="1" id="id4">
 
134
    <footnote auto="1" ids="id4">
135
135
        <paragraph>
136
136
            Auto-numbered footnote 2.
137
 
    <footnote auto="1" id="id5">
 
137
    <footnote auto="1" ids="id5">
138
138
        <paragraph>
139
139
            Auto-numbered footnote 3.
140
140
    <paragraph>
141
 
        <footnote_reference auto="1" id="id6">
 
141
        <footnote_reference auto="1" ids="id6">
142
142
         is the third auto-numbered footnote reference.
143
143
"""],
144
144
["""\
158
158
"""\
159
159
<document source="test data">
160
160
    <paragraph>
161
 
        <footnote_reference auto="1" id="id1" refname="third">
 
161
        <footnote_reference auto="1" ids="id1" refname="third">
162
162
         is a reference to the third auto-numbered footnote.
163
 
    <footnote auto="1" id="first" name="first">
 
163
    <footnote auto="1" ids="first" names="first">
164
164
        <paragraph>
165
165
            First auto-numbered footnote.
166
 
    <footnote auto="1" id="second" name="second">
 
166
    <footnote auto="1" ids="second" names="second">
167
167
        <paragraph>
168
168
            Second auto-numbered footnote.
169
 
    <footnote auto="1" id="third" name="third">
 
169
    <footnote auto="1" ids="third" names="third">
170
170
        <paragraph>
171
171
            Third auto-numbered footnote.
172
172
    <paragraph>
173
 
        <footnote_reference auto="1" id="id2" refname="second">
 
173
        <footnote_reference auto="1" ids="id2" refname="second">
174
174
         is a reference to the second auto-numbered footnote.
175
 
        <footnote_reference auto="1" id="id3" refname="first">
 
175
        <footnote_reference auto="1" ids="id3" refname="first">
176
176
         is a reference to the first auto-numbered footnote.
177
 
        <footnote_reference auto="1" id="id4" refname="third">
 
177
        <footnote_reference auto="1" ids="id4" refname="third">
178
178
         is another reference to the third auto-numbered footnote.
179
179
    <paragraph>
180
180
        Here are some internal cross-references to the targets generated by
208
208
    <paragraph>
209
209
        Mixed anonymous and labelled auto-numbered footnotes:
210
210
    <paragraph>
211
 
        <footnote_reference auto="1" id="id1" refname="four">
 
211
        <footnote_reference auto="1" ids="id1" refname="four">
212
212
         should be 4, \n\
213
 
        <footnote_reference auto="1" id="id2">
 
213
        <footnote_reference auto="1" ids="id2">
214
214
         should be 1,
215
 
        <footnote_reference auto="1" id="id3">
 
215
        <footnote_reference auto="1" ids="id3">
216
216
         should be 3, \n\
217
 
        <footnote_reference auto="1" id="id4">
 
217
        <footnote_reference auto="1" ids="id4">
218
218
         is one too many,
219
 
        <footnote_reference auto="1" id="id5" refname="two">
 
219
        <footnote_reference auto="1" ids="id5" refname="two">
220
220
         should be 2, and \n\
221
 
        <footnote_reference auto="1" id="id6" refname="six">
 
221
        <footnote_reference auto="1" ids="id6" refname="six">
222
222
         doesn't exist.
223
 
    <footnote auto="1" id="id7">
 
223
    <footnote auto="1" ids="id7">
224
224
        <paragraph>
225
225
            Auto-numbered footnote 1.
226
 
    <footnote auto="1" id="two" name="two">
 
226
    <footnote auto="1" ids="two" names="two">
227
227
        <paragraph>
228
228
            Auto-numbered footnote 2.
229
 
    <footnote auto="1" id="id8">
 
229
    <footnote auto="1" ids="id8">
230
230
        <paragraph>
231
231
            Auto-numbered footnote 3.
232
 
    <footnote auto="1" id="four" name="four">
 
232
    <footnote auto="1" ids="four" names="four">
233
233
        <paragraph>
234
234
            Auto-numbered footnote 4.
235
 
    <footnote auto="1" dupname="five" id="five">
 
235
    <footnote auto="1" dupnames="five" ids="five">
236
236
        <paragraph>
237
237
            Auto-numbered footnote 5.
238
 
    <footnote auto="1" dupname="five" id="id9">
 
238
    <footnote auto="1" dupnames="five" ids="id9">
239
239
        <system_message backrefs="id9" level="2" line="12" source="test data" type="WARNING">
240
240
            <paragraph>
241
241
                Duplicate explicit target name: "five".
265
265
        Mixed manually-numbered, anonymous auto-numbered,
266
266
        and labelled auto-numbered footnotes:
267
267
    <paragraph>
268
 
        <footnote_reference auto="1" id="id1" refname="four">
 
268
        <footnote_reference auto="1" ids="id1" refname="four">
269
269
         should be 4, \n\
270
 
        <footnote_reference auto="1" id="id2">
 
270
        <footnote_reference auto="1" ids="id2">
271
271
         should be 2,
272
 
        <footnote_reference id="id3" refname="1">
 
272
        <footnote_reference ids="id3" refname="1">
273
273
            1
274
274
         is 1, \n\
275
 
        <footnote_reference id="id4" refname="3">
 
275
        <footnote_reference ids="id4" refname="3">
276
276
            3
277
277
         is 3,
278
 
        <footnote_reference auto="1" id="id5">
 
278
        <footnote_reference auto="1" ids="id5">
279
279
         should be 6, \n\
280
 
        <footnote_reference auto="1" id="id6">
 
280
        <footnote_reference auto="1" ids="id6">
281
281
         is one too many,
282
 
        <footnote_reference auto="1" id="id7" refname="five">
 
282
        <footnote_reference auto="1" ids="id7" refname="five">
283
283
         should be 5, and \n\
284
 
        <footnote_reference auto="1" id="id8" refname="six">
 
284
        <footnote_reference auto="1" ids="id8" refname="six">
285
285
         doesn't exist.
286
 
    <footnote id="id9" name="1">
 
286
    <footnote ids="id9" names="1">
287
287
        <label>
288
288
            1
289
289
        <paragraph>
290
290
            Manually-numbered footnote 1.
291
 
    <footnote auto="1" id="id10">
 
291
    <footnote auto="1" ids="id10">
292
292
        <paragraph>
293
293
            Auto-numbered footnote 2.
294
 
    <footnote auto="1" id="four" name="four">
 
294
    <footnote auto="1" ids="four" names="four">
295
295
        <paragraph>
296
296
            Auto-numbered footnote 4.
297
 
    <footnote id="id11" name="3">
 
297
    <footnote ids="id11" names="3">
298
298
        <label>
299
299
            3
300
300
        <paragraph>
301
301
            Manually-numbered footnote 3
302
 
    <footnote auto="1" dupname="five" id="five">
 
302
    <footnote auto="1" dupnames="five" ids="five">
303
303
        <paragraph>
304
304
            Auto-numbered footnote 5.
305
 
    <footnote auto="1" dupname="five" id="id12">
 
305
    <footnote auto="1" dupnames="five" ids="id12">
306
306
        <system_message backrefs="id12" level="2" line="14" source="test data" type="WARNING">
307
307
            <paragraph>
308
308
                Duplicate explicit target name: "five".
309
309
        <paragraph>
310
310
            Auto-numbered footnote 5 again (duplicate).
311
 
    <footnote auto="1" id="id13">
 
311
    <footnote auto="1" ids="id13">
312
312
        <paragraph>
313
313
            Auto-numbered footnote 6.
314
314
"""],
320
320
""",
321
321
"""\
322
322
<document source="test data">
323
 
    <footnote auto="*" id="id1">
 
323
    <footnote auto="*" ids="id1">
324
324
        <paragraph>
325
325
            This is an auto-symbol footnote.
326
326
"""],