summaryrefslogtreecommitdiff
path: root/docutils/test/test_transforms/test_hyperlinks.py
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-10-11 21:36:06 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-10-11 21:36:06 +0000
commit3b2fc92d25dceeebb7d92a3de8771392cc0cf1e7 (patch)
tree8862db562b153ef5c2d4021eb6e2890ae6e0da7e /docutils/test/test_transforms/test_hyperlinks.py
parent6e03ef782ab76d9e11cd003eb4759a0599cf8897 (diff)
downloaddocutils-3b2fc92d25dceeebb7d92a3de8771392cc0cf1e7.tar.gz
removed more internal state (`document.anonymous_refs` and
`document.anonymous_targets`) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3939 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/test_transforms/test_hyperlinks.py')
-rwxr-xr-xdocutils/test/test_transforms/test_hyperlinks.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/docutils/test/test_transforms/test_hyperlinks.py b/docutils/test/test_transforms/test_hyperlinks.py
index 1b84a18c4..cef12a4f1 100755
--- a/docutils/test/test_transforms/test_hyperlinks.py
+++ b/docutils/test/test_transforms/test_hyperlinks.py
@@ -281,6 +281,36 @@ __ ztarget_
Indirect hyperlink target (id="id2") refers to target "ztarget", which is a duplicate, and cannot be used as a unique reference.
"""],
["""\
+The next anonymous hyperlink reference is parsed (and discarded) at
+some point, but nonetheless anonymous hyperlink references and targets
+match in this snippet.
+
+.. |invalid| replace:: anonymous__
+
+hyperlink__
+
+__ URL
+""",
+"""\
+<document source="test data">
+ <paragraph>
+ The next anonymous hyperlink reference is parsed (and discarded) at
+ some point, but nonetheless anonymous hyperlink references and targets
+ match in this snippet.
+ <system_message level="3" line="5" source="test data" type="ERROR">
+ <paragraph>
+ Substitution definition contains illegal element:
+ <literal_block xml:space="preserve">
+ <reference anonymous="1" name="anonymous">
+ anonymous
+ <literal_block xml:space="preserve">
+ .. |invalid| replace:: anonymous__
+ <paragraph>
+ <reference anonymous="1" name="hyperlink" refuri="URL">
+ hyperlink
+ <target anonymous="1" ids="id1" refuri="URL">
+"""],
+["""\
An `embedded uri <http://direct>`_.
Another reference to the same `embedded URI`_.