3
# Author: David Goodger
4
# Contact: goodger@users.sourceforge.net
5
# Revision: $Revision: 4156 $
6
# Date: $Date: 2005-12-08 05:43:13 +0100 (Thu, 08 Dec 2005) $
7
# Copyright: This module has been placed in the public domain.
10
Tests for `docutils.transforms.references.TargetNotes` (via
11
`docutils.transforms.universal.LastReaderPending`).
14
from __init__ import DocutilsTestSupport
15
from docutils.transforms.references import PropagateTargets, \
16
AnonymousHyperlinks, IndirectHyperlinks, ExternalTargets, \
17
InternalTargets, DanglingReferences, Footnotes
18
from docutils.parsers.rst import Parser
23
s = DocutilsTestSupport.TransformTestSuite(parser)
24
s.generateTests(totest)
29
totest['tables_of_contents'] = ((PropagateTargets, AnonymousHyperlinks,
31
ExternalTargets, InternalTargets,
35
.. _target: http://exammple.org
37
A reference to a target_.
42
<document source="test data">
43
<target ids="target" names="target" refuri="http://exammple.org">
46
<reference name="target" refuri="http://exammple.org">
49
<footnote_reference auto="1" ids="id2" refid="id1">
51
<footnote auto="1" ids="id1" names="TARGET_NOTE:\\ id1">
53
<reference refuri="http://exammple.org">
57
.. _target: http://exammple.org
59
A reference to a target_.
61
.. target-notes:: :class: custom
64
<document source="test data">
65
<target ids="target" names="target" refuri="http://exammple.org">
68
<reference name="target" refuri="http://exammple.org">
70
<inline classes="custom">
72
<footnote_reference auto="1" classes="custom" ids="id2" refid="id1">
74
<footnote auto="1" ids="id1" names="TARGET_NOTE:\\ id1">
76
<reference refuri="http://exammple.org">
82
if __name__ == '__main__':
84
unittest.main(defaultTest='suite')