summaryrefslogtreecommitdiff
path: root/docutils/test/test_transforms
diff options
context:
space:
mode:
author(no author) <(no author)@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2002-05-01 02:53:07 +0000
committer(no author) <(no author)@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2002-05-01 02:53:07 +0000
commit9e0c8b3997b83945c58c5ede77278f205b97d03e (patch)
tree5fdea7c382ce0fdcc49bc2bc0f9e8faaa7f4effc /docutils/test/test_transforms
parent6a5511292419427c9a4c9258b71c47d072a02878 (diff)
downloaddocutils-tibs.tar.gz
This commit was manufactured by cvs2svn to create branch 'tibs'.tibs
git-svn-id: http://svn.code.sf.net/p/docutils/code/branches/tibs@63 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/test_transforms')
-rw-r--r--docutils/test/test_transforms/__init__.py11
-rwxr-xr-xdocutils/test/test_transforms/test_contents.py262
-rwxr-xr-xdocutils/test/test_transforms/test_docinfo.py326
-rwxr-xr-xdocutils/test/test_transforms/test_doctitle.py174
-rwxr-xr-xdocutils/test/test_transforms/test_final_checks.py46
-rwxr-xr-xdocutils/test/test_transforms/test_footnotes.py520
-rwxr-xr-xdocutils/test/test_transforms/test_hyperlinks.py440
-rwxr-xr-xdocutils/test/test_transforms/test_messages.py66
-rwxr-xr-xdocutils/test/test_transforms/test_substitutions.py60
9 files changed, 0 insertions, 1905 deletions
diff --git a/docutils/test/test_transforms/__init__.py b/docutils/test/test_transforms/__init__.py
deleted file mode 100644
index 027d2f3bc..000000000
--- a/docutils/test/test_transforms/__init__.py
+++ /dev/null
@@ -1,11 +0,0 @@
-import os, os.path, sys
-
-sys.path.insert(0, os.path.abspath(os.curdir))
-prev = ''
-while sys.path[0] != prev:
- try:
- import DocutilsTestSupport
- break
- except ImportError:
- prev = sys.path[0]
- sys.path[0] = os.path.dirname(prev)
diff --git a/docutils/test/test_transforms/test_contents.py b/docutils/test/test_transforms/test_contents.py
deleted file mode 100755
index 05a159796..000000000
--- a/docutils/test/test_transforms/test_contents.py
+++ /dev/null
@@ -1,262 +0,0 @@
-#! /usr/bin/env python
-
-"""
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: This module has been placed in the public domain.
-
-Tests for docutils.transforms.components.Contents.
-"""
-
-from __init__ import DocutilsTestSupport
-from docutils.transforms.universal import LastReaderPending
-from docutils.parsers.rst import Parser
-
-
-def suite():
- parser = Parser()
- s = DocutilsTestSupport.TransformTestSuite(parser)
- s.generateTests(totest)
- return s
-
-totest = {}
-
-totest['tables_of_contents'] = ((LastReaderPending,), [
-["""\
-.. contents::
-
-Title 1
-=======
-Paragraph 1.
-
-Title 2
--------
-Paragraph 2.
-
-Title 3
-```````
-Paragraph 3.
-
-Title 4
--------
-Paragraph 4.
-""",
-"""\
-<document>
- <topic class="contents">
- <title>
- Contents
- <bullet_list>
- <list_item id="id1">
- <paragraph>
- <reference refid="title-1">
- Title 1
- <bullet_list>
- <list_item id="id2">
- <paragraph>
- <reference refid="title-2">
- Title 2
- <bullet_list>
- <list_item id="id3">
- <paragraph>
- <reference refid="title-3">
- Title 3
- <list_item id="id4">
- <paragraph>
- <reference refid="title-4">
- Title 4
- <section id="title-1" name="title 1">
- <title refid="id1">
- Title 1
- <paragraph>
- Paragraph 1.
- <section id="title-2" name="title 2">
- <title refid="id2">
- Title 2
- <paragraph>
- Paragraph 2.
- <section id="title-3" name="title 3">
- <title refid="id3">
- Title 3
- <paragraph>
- Paragraph 3.
- <section id="title-4" name="title 4">
- <title refid="id4">
- Title 4
- <paragraph>
- Paragraph 4.
-"""],
-["""\
-.. contents:: Table of Contents
-
-Title 1
-=======
-Paragraph 1.
-
-Title 2
--------
-Paragraph 2.
-""",
-"""\
-<document>
- <topic class="contents">
- <title>
- Table of Contents
- <bullet_list>
- <list_item id="id1">
- <paragraph>
- <reference refid="title-1">
- Title 1
- <bullet_list>
- <list_item id="id2">
- <paragraph>
- <reference refid="title-2">
- Title 2
- <section id="title-1" name="title 1">
- <title refid="id1">
- Title 1
- <paragraph>
- Paragraph 1.
- <section id="title-2" name="title 2">
- <title refid="id2">
- Title 2
- <paragraph>
- Paragraph 2.
-"""],
-["""\
-.. contents::
- :depth: 2
-
-Title 1
-=======
-Paragraph 1.
-
-Title 2
--------
-Paragraph 2.
-
-Title 3
-```````
-Paragraph 3.
-
-Title 4
--------
-Paragraph 4.
-""",
-"""\
-<document>
- <topic class="contents">
- <title>
- Contents
- <bullet_list>
- <list_item id="id1">
- <paragraph>
- <reference refid="title-1">
- Title 1
- <bullet_list>
- <list_item id="id2">
- <paragraph>
- <reference refid="title-2">
- Title 2
- <list_item id="id3">
- <paragraph>
- <reference refid="title-4">
- Title 4
- <section id="title-1" name="title 1">
- <title refid="id1">
- Title 1
- <paragraph>
- Paragraph 1.
- <section id="title-2" name="title 2">
- <title refid="id2">
- Title 2
- <paragraph>
- Paragraph 2.
- <section id="title-3" name="title 3">
- <title>
- Title 3
- <paragraph>
- Paragraph 3.
- <section id="title-4" name="title 4">
- <title refid="id3">
- Title 4
- <paragraph>
- Paragraph 4.
-"""],
-["""\
-Title 1
-=======
-
-.. contents::
- :local:
-
-Paragraph 1.
-
-Title 2
--------
-Paragraph 2.
-
-Title 3
-```````
-Paragraph 3.
-
-Title 4
--------
-Paragraph 4.
-""",
-"""\
-<document>
- <section id="title-1" name="title 1">
- <title>
- Title 1
- <topic class="contents">
- <bullet_list>
- <list_item id="id1">
- <paragraph>
- <reference refid="title-2">
- Title 2
- <bullet_list>
- <list_item id="id2">
- <paragraph>
- <reference refid="title-3">
- Title 3
- <list_item id="id3">
- <paragraph>
- <reference refid="title-4">
- Title 4
- <paragraph>
- Paragraph 1.
- <section id="title-2" name="title 2">
- <title refid="id1">
- Title 2
- <paragraph>
- Paragraph 2.
- <section id="title-3" name="title 3">
- <title refid="id2">
- Title 3
- <paragraph>
- Paragraph 3.
- <section id="title-4" name="title 4">
- <title refid="id3">
- Title 4
- <paragraph>
- Paragraph 4.
-"""],
-["""\
-.. contents::
-
-Degenerate case, no table of contents generated.
-""",
-"""\
-<document>
- <paragraph>
- Degenerate case, no table of contents generated.
-"""],
-])
-
-
-if __name__ == '__main__':
- import unittest
- unittest.main(defaultTest='suite')
diff --git a/docutils/test/test_transforms/test_docinfo.py b/docutils/test/test_transforms/test_docinfo.py
deleted file mode 100755
index d5dd4b873..000000000
--- a/docutils/test/test_transforms/test_docinfo.py
+++ /dev/null
@@ -1,326 +0,0 @@
-#! /usr/bin/env python
-
-"""
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: This module has been placed in the public domain.
-
-Tests for docutils.transforms.frontmatter.DocInfo.
-"""
-
-from __init__ import DocutilsTestSupport
-from docutils.transforms.frontmatter import DocInfo
-from docutils.parsers.rst import Parser
-
-
-def suite():
- parser = Parser()
- s = DocutilsTestSupport.TransformTestSuite(parser)
- s.generateTests(totest)
- return s
-
-totest = {}
-
-totest['bibliographic_field_lists'] = ((DocInfo,), [
-["""\
-.. Bibliographic element extraction.
-
-:Abstract:
- There can only be one abstract.
-
- It is automatically moved to the end of the other bibliographic elements.
-
-:Author: Me
-:Version: 1
-:Date: 2001-08-11
-:Parameter i: integer
-""",
-"""\
-<document>
- <docinfo>
- <author>
- Me
- <version>
- 1
- <date>
- 2001-08-11
- <topic class="abstract">
- <title>
- Abstract
- <paragraph>
- There can only be one abstract.
- <paragraph>
- It is automatically moved to the end of the other bibliographic elements.
- <comment>
- Bibliographic element extraction.
- <field_list>
- <field>
- <field_name>
- Parameter
- <field_argument>
- i
- <field_body>
- <paragraph>
- integer
-"""],
-["""\
-.. Bibliographic element extraction.
-
-:Abstract: Abstract 1.
-:Author: Me
-:Contact: me@my.org
-:Version: 1
-:Abstract: Abstract 2 (should generate a warning).
-:Date: 2001-08-11
-:Parameter i: integer
-""",
-"""\
-<document>
- <docinfo>
- <author>
- Me
- <contact>
- <reference refuri="mailto:me@my.org">
- me@my.org
- <version>
- 1
- <date>
- 2001-08-11
- <topic class="abstract">
- <title>
- Abstract
- <paragraph>
- Abstract 1.
- <comment>
- Bibliographic element extraction.
- <field_list>
- <field>
- <field_name>
- Abstract
- <field_body>
- <paragraph>
- Abstract 2 (should generate a warning).
- <system_message level="2" type="WARNING">
- <paragraph>
- There can only be one abstract.
- <field>
- <field_name>
- Parameter
- <field_argument>
- i
- <field_body>
- <paragraph>
- integer
-"""],
-["""\
-:Author: - must be a paragraph
-:Status: a *simple* paragraph
-:Date: But only one
-
- paragraph.
-:Version:
-
-.. and not empty either
-""",
-"""\
-<document>
- <docinfo>
- <status>
- a \n\
- <emphasis>
- simple
- paragraph
- <field_list>
- <field>
- <field_name>
- Author
- <field_body>
- <bullet_list bullet="-">
- <list_item>
- <paragraph>
- must be a paragraph
- <system_message level="2" type="WARNING">
- <paragraph>
- Cannot extract bibliographic field "Author" containing anything other than a single paragraph.
- <field>
- <field_name>
- Date
- <field_body>
- <paragraph>
- But only one
- <paragraph>
- paragraph.
- <system_message level="2" type="WARNING">
- <paragraph>
- Cannot extract compound bibliographic field "Date".
- <field>
- <field_name>
- Version
- <field_body>
- <system_message level="2" type="WARNING">
- <paragraph>
- Cannot extract empty bibliographic field "Version".
- <comment>
- and not empty either
-"""],
-["""\
-:Authors: Me, Myself, **I**
-:Authors: PacMan; Ms. PacMan; PacMan, Jr.
-:Authors:
- Here
-
- There
-
- *Everywhere*
-:Authors: - First
- - Second
- - Third
-""",
-"""\
-<document>
- <docinfo>
- <authors>
- <author>
- Me
- <author>
- Myself
- <author>
- I
- <authors>
- <author>
- PacMan
- <author>
- Ms. PacMan
- <author>
- PacMan, Jr.
- <authors>
- <author>
- Here
- <author>
- There
- <author>
- <emphasis>
- Everywhere
- <authors>
- <author>
- First
- <author>
- Second
- <author>
- Third
-"""],
-["""\
-:Authors:
-
-:Authors: 1. One
- 2. Two
-
-:Authors:
- -
- -
-
-:Authors:
- - One
-
- Two
-
-:Authors:
- - One
-
- Two
-""",
-"""\
-<document>
- <field_list>
- <field>
- <field_name>
- Authors
- <field_body>
- <system_message level="2" type="WARNING">
- <paragraph>
- Cannot extract empty bibliographic field "Authors".
- <field>
- <field_name>
- Authors
- <field_body>
- <enumerated_list enumtype="arabic" prefix="" suffix=".">
- <list_item>
- <paragraph>
- One
- <list_item>
- <paragraph>
- Two
- <system_message level="2" type="WARNING">
- <paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item.
- <field>
- <field_name>
- Authors
- <field_body>
- <bullet_list bullet="-">
- <list_item>
- <list_item>
- <system_message level="2" type="WARNING">
- <paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item.
- <field>
- <field_name>
- Authors
- <field_body>
- <bullet_list bullet="-">
- <list_item>
- <paragraph>
- One
- <paragraph>
- Two
- <system_message level="2" type="WARNING">
- <paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item.
- <field>
- <field_name>
- Authors
- <field_body>
- <bullet_list bullet="-">
- <list_item>
- <paragraph>
- One
- <paragraph>
- Two
- <system_message level="2" type="WARNING">
- <paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item.
-"""],
-["""\
-.. RCS keyword extraction.
-
-:Status: $RCSfile$
-:Date: $Date$
-
-RCS keyword 'RCSfile' doesn't change unless the file name changes,
-so it's safe. The 'Date' keyword changes every time the file is
-checked in to CVS, so the test's expected output text has to be
-derived (hacked) in parallel in order to stay in sync.
-""",
-"""\
-<document>
- <docinfo>
- <status>
- test_docinfo.py
- <date>
- %s
- <comment>
- RCS keyword extraction.
- <paragraph>
- RCS keyword 'RCSfile' doesn't change unless the file name changes,
- so it's safe. The 'Date' keyword changes every time the file is
- checked in to CVS, so the test's expected output text has to be
- derived (hacked) in parallel in order to stay in sync.
-""" % ('$Date$'[7:17].replace('/', '-'),)],
-])
-
-
-if __name__ == '__main__':
- import unittest
- unittest.main(defaultTest='suite')
diff --git a/docutils/test/test_transforms/test_doctitle.py b/docutils/test/test_transforms/test_doctitle.py
deleted file mode 100755
index 842906945..000000000
--- a/docutils/test/test_transforms/test_doctitle.py
+++ /dev/null
@@ -1,174 +0,0 @@
-#! /usr/bin/env python
-
-"""
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: This module has been placed in the public domain.
-
-Tests for docutils.transforms.frontmatter.DocTitle.
-"""
-
-from __init__ import DocutilsTestSupport
-from docutils.transforms.frontmatter import DocTitle
-from docutils.parsers.rst import Parser
-
-
-def suite():
- parser = Parser()
- s = DocutilsTestSupport.TransformTestSuite(parser)
- s.generateTests(totest)
- return s
-
-totest = {}
-
-totest['section_headers'] = ((DocTitle,), [
-["""\
-.. test title promotion
-
-Title
-=====
-
-Paragraph.
-""",
-"""\
-<document id="title" name="title">
- <title>
- Title
- <comment>
- test title promotion
- <paragraph>
- Paragraph.
-"""],
-["""\
-Title
-=====
-Paragraph (no blank line).
-""",
-"""\
-<document id="title" name="title">
- <title>
- Title
- <paragraph>
- Paragraph (no blank line).
-"""],
-["""\
-Paragraph.
-
-Title
-=====
-
-Paragraph.
-""",
-"""\
-<document>
- <paragraph>
- Paragraph.
- <section id="title" name="title">
- <title>
- Title
- <paragraph>
- Paragraph.
-"""],
-["""\
-Title
-=====
-
-Subtitle
---------
-
-Test title & subtitle.
-""",
-"""\
-<document id="title" name="title">
- <title>
- Title
- <subtitle id="subtitle" name="subtitle">
- Subtitle
- <paragraph>
- Test title & subtitle.
-"""],
-["""\
-Title
-====
-
-Test short underline.
-""",
-"""\
-<document id="title" name="title">
- <title>
- Title
- <system_message level="1" type="INFO">
- <paragraph>
- Title underline too short at line 2.
- <literal_block>
- Title
- ====
- <paragraph>
- Test short underline.
-"""],
-["""\
-=======
- Long Title
-=======
-
-Test long title and space normalization.
-The system_message should move after the document title
-(it was before the beginning of the section).
-""",
-"""\
-<document id="long-title" name="long title">
- <title>
- Long Title
- <system_message level="1" type="INFO">
- <paragraph>
- Title overline too short at line 1.
- <literal_block>
- =======
- Long Title
- =======
- <paragraph>
- Test long title and space normalization.
- The system_message should move after the document title
- (it was before the beginning of the section).
-"""],
-["""\
-.. Test multiple second-level titles.
-
-Title 1
-=======
-Paragraph 1.
-
-Title 2
--------
-Paragraph 2.
-
-Title 3
--------
-Paragraph 3.
-""",
-"""\
-<document id="title-1" name="title 1">
- <title>
- Title 1
- <comment>
- Test multiple second-level titles.
- <paragraph>
- Paragraph 1.
- <section id="title-2" name="title 2">
- <title>
- Title 2
- <paragraph>
- Paragraph 2.
- <section id="title-3" name="title 3">
- <title>
- Title 3
- <paragraph>
- Paragraph 3.
-"""],
-])
-
-if __name__ == '__main__':
- import unittest
- unittest.main(defaultTest='suite')
diff --git a/docutils/test/test_transforms/test_final_checks.py b/docutils/test/test_transforms/test_final_checks.py
deleted file mode 100755
index c74919c56..000000000
--- a/docutils/test/test_transforms/test_final_checks.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /usr/bin/env python
-
-"""
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: This module has been placed in the public domain.
-
-Tests for docutils.transforms.universal.FinalChecks.
-"""
-
-from __init__ import DocutilsTestSupport
-from docutils.transforms.universal import FinalChecks
-from docutils.parsers.rst import Parser
-
-
-def suite():
- parser = Parser()
- s = DocutilsTestSupport.TransformTestSuite(parser)
- s.generateTests(totest)
- return s
-
-totest = {}
-
-totest['final_checks'] = ((FinalChecks,), [
-["""\
-Unknown reference_.
-""",
-"""\
-<document>
- <paragraph>
- Unknown
- <problematic id="id2" refid="id1">
- reference_
- .
- <system_message backrefs="id2" id="id1" level="3" type="ERROR">
- <paragraph>
- Unknown target name: "reference".
-"""],
-])
-
-
-if __name__ == '__main__':
- import unittest
- unittest.main(defaultTest='suite')
diff --git a/docutils/test/test_transforms/test_footnotes.py b/docutils/test/test_transforms/test_footnotes.py
deleted file mode 100755
index 9a3c09aa5..000000000
--- a/docutils/test/test_transforms/test_footnotes.py
+++ /dev/null
@@ -1,520 +0,0 @@
-#! /usr/bin/env python
-
-"""
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: This module has been placed in the public domain.
-
-Tests for docutils.transforms.references.Footnotes.
-"""
-
-from __init__ import DocutilsTestSupport
-from docutils.transforms.references import Footnotes
-from docutils.parsers.rst import Parser
-
-
-def suite():
- parser = Parser()
- s = DocutilsTestSupport.TransformTestSuite(parser)
- s.generateTests(totest)
- return s
-
-totest = {}
-
-totest['footnotes'] = ((Footnotes,), [
-["""\
-[#autolabel]_
-
-.. [#autolabel] text
-""",
-"""\
-<document>
- <paragraph>
- <footnote_reference auto="1" id="id1" refid="autolabel">
- 1
- <footnote auto="1" backrefs="id1" id="autolabel" name="autolabel">
- <label>
- 1
- <paragraph>
- text
-"""],
-["""\
-autonumber: [#]_
-
-.. [#] text
-""",
-"""\
-<document>
- <paragraph>
- autonumber: \n\
- <footnote_reference auto="1" id="id1" refid="id2">
- 1
- <footnote auto="1" backrefs="id1" id="id2" name="1">
- <label>
- 1
- <paragraph>
- text
-"""],
-["""\
-[#]_ is the first auto-numbered footnote reference.
-[#]_ is the second auto-numbered footnote reference.
-
-.. [#] Auto-numbered footnote 1.
-.. [#] Auto-numbered footnote 2.
-.. [#] Auto-numbered footnote 3.
-
-[#]_ is the third auto-numbered footnote reference.
-""",
-"""\
-<document>
- <paragraph>
- <footnote_reference auto="1" id="id1" refid="id3">
- 1
- is the first auto-numbered footnote reference.
- <footnote_reference auto="1" id="id2" refid="id4">
- 2
- is the second auto-numbered footnote reference.
- <footnote auto="1" backrefs="id1" id="id3" name="1">
- <label>
- 1
- <paragraph>
- Auto-numbered footnote 1.
- <footnote auto="1" backrefs="id2" id="id4" name="2">
- <label>
- 2
- <paragraph>
- Auto-numbered footnote 2.
- <footnote auto="1" backrefs="id6" id="id5" name="3">
- <label>
- 3
- <paragraph>
- Auto-numbered footnote 3.
- <paragraph>
- <footnote_reference auto="1" id="id6" refid="id5">
- 3
- is the third auto-numbered footnote reference.
-"""],
-["""\
-[#third]_ is a reference to the third auto-numbered footnote.
-
-.. [#first] First auto-numbered footnote.
-.. [#second] Second auto-numbered footnote.
-.. [#third] Third auto-numbered footnote.
-
-[#second]_ is a reference to the second auto-numbered footnote.
-[#first]_ is a reference to the first auto-numbered footnote.
-[#third]_ is another reference to the third auto-numbered footnote.
-
-Here are some internal cross-references to the implicit targets
-generated by the footnotes: first_, second_, third_.
-""",
-"""\
-<document>
- <paragraph>
- <footnote_reference auto="1" id="id1" refid="third">
- 3
- is a reference to the third auto-numbered footnote.
- <footnote auto="1" backrefs="id3" id="first" name="first">
- <label>
- 1
- <paragraph>
- First auto-numbered footnote.
- <footnote auto="1" backrefs="id2" id="second" name="second">
- <label>
- 2
- <paragraph>
- Second auto-numbered footnote.
- <footnote auto="1" backrefs="id1 id4" id="third" name="third">
- <label>
- 3
- <paragraph>
- Third auto-numbered footnote.
- <paragraph>
- <footnote_reference auto="1" id="id2" refid="second">
- 2
- is a reference to the second auto-numbered footnote.
- <footnote_reference auto="1" id="id3" refid="first">
- 1
- is a reference to the first auto-numbered footnote.
- <footnote_reference auto="1" id="id4" refid="third">
- 3
- is another reference to the third auto-numbered footnote.
- <paragraph>
- Here are some internal cross-references to the implicit targets
- generated by the footnotes: \n\
- <reference refname="first">
- first
- , \n\
- <reference refname="second">
- second
- , \n\
- <reference refname="third">
- third
- .
-"""],
-["""\
-Mixed anonymous and labelled auto-numbered footnotes:
-
-[#four]_ should be 4, [#]_ should be 1,
-[#]_ should be 3, [#]_ is one too many,
-[#two]_ should be 2, and [#six]_ doesn't exist.
-
-.. [#] Auto-numbered footnote 1.
-.. [#two] Auto-numbered footnote 2.
-.. [#] Auto-numbered footnote 3.
-.. [#four] Auto-numbered footnote 4.
-.. [#five] Auto-numbered footnote 5.
-.. [#five] Auto-numbered footnote 5 again (duplicate).
-""",
-"""\
-<document>
- <paragraph>
- Mixed anonymous and labelled auto-numbered footnotes:
- <paragraph>
- <footnote_reference auto="1" id="id1" refid="four">
- 4
- should be 4, \n\
- <footnote_reference auto="1" id="id2" refid="id7">
- 1
- should be 1,
- <footnote_reference auto="1" id="id3" refid="id8">
- 3
- should be 3, \n\
- <problematic id="id11" refid="id10">
- [#]_
- is one too many,
- <footnote_reference auto="1" id="id5" refid="two">
- 2
- should be 2, and \n\
- <footnote_reference auto="1" id="id6" refname="six">
- doesn't exist.
- <footnote auto="1" backrefs="id2" id="id7" name="1">
- <label>
- 1
- <paragraph>
- Auto-numbered footnote 1.
- <footnote auto="1" backrefs="id5" id="two" name="two">
- <label>
- 2
- <paragraph>
- Auto-numbered footnote 2.
- <footnote auto="1" backrefs="id3" id="id8" name="3">
- <label>
- 3
- <paragraph>
- Auto-numbered footnote 3.
- <footnote auto="1" backrefs="id1" id="four" name="four">
- <label>
- 4
- <paragraph>
- Auto-numbered footnote 4.
- <footnote auto="1" dupname="five" id="five">
- <label>
- 5
- <paragraph>
- Auto-numbered footnote 5.
- <footnote auto="1" dupname="five" id="id9">
- <label>
- 6
- <system_message backrefs="id9" level="2" type="WARNING">
- <paragraph>
- Duplicate explicit target name: "five".
- <paragraph>
- Auto-numbered footnote 5 again (duplicate).
- <system_message backrefs="id11" id="id10" level="3" type="ERROR">
- <paragraph>
- Too many autonumbered footnote references: only 2 corresponding footnotes available.
-"""],
-["""\
-Mixed auto-numbered and manual footnotes:
-
-.. [1] manually numbered
-.. [#] auto-numbered
-.. [#label] autonumber-labeled
-""",
-"""\
-<document>
- <paragraph>
- Mixed auto-numbered and manual footnotes:
- <footnote id="id1" name="1">
- <label>
- 1
- <paragraph>
- manually numbered
- <footnote auto="1" id="id2" name="2">
- <label>
- 2
- <paragraph>
- auto-numbered
- <footnote auto="1" id="label" name="label">
- <label>
- 3
- <paragraph>
- autonumber-labeled
-"""],
-["""\
-A labeled autonumbered footnote referece: [#footnote]_.
-
-An unlabeled autonumbered footnote referece: [#]_.
-
-.. [#] Unlabeled autonumbered footnote.
-.. [#footnote] Labeled autonumbered footnote.
- Note that the footnotes are not in the same
- order as the references.
-""",
-"""\
-<document>
- <paragraph>
- A labeled autonumbered footnote referece: \n\
- <footnote_reference auto="1" id="id1" refid="footnote">
- 2
- .
- <paragraph>
- An unlabeled autonumbered footnote referece: \n\
- <footnote_reference auto="1" id="id2" refid="id3">
- 1
- .
- <footnote auto="1" backrefs="id2" id="id3" name="1">
- <label>
- 1
- <paragraph>
- Unlabeled autonumbered footnote.
- <footnote auto="1" backrefs="id1" id="footnote" name="footnote">
- <label>
- 2
- <paragraph>
- Labeled autonumbered footnote.
- Note that the footnotes are not in the same
- order as the references.
-"""],
-["""\
-Mixed manually-numbered, anonymous auto-numbered,
-and labelled auto-numbered footnotes:
-
-[#four]_ should be 4, [#]_ should be 2,
-[1]_ is 1, [3]_ is 3,
-[#]_ should be 6, [#]_ is one too many,
-[#five]_ should be 5, and [#eight]_ doesn't exist.
-
-.. [1] Manually-numbered footnote 1.
-.. [#] Auto-numbered footnote 2.
-.. [#four] Auto-numbered footnote 4.
-.. [3] Manually-numbered footnote 3
-.. [#five] Auto-numbered footnote 5.
-.. [#] Auto-numbered footnote 6.
-.. [#five] Auto-numbered footnote 5 again (duplicate).
-""",
-"""\
-<document>
- <paragraph>
- Mixed manually-numbered, anonymous auto-numbered,
- and labelled auto-numbered footnotes:
- <paragraph>
- <footnote_reference auto="1" id="id1" refid="four">
- 4
- should be 4, \n\
- <footnote_reference auto="1" id="id2" refid="id10">
- 2
- should be 2,
- <footnote_reference id="id3" refid="id9">
- 1
- is 1, \n\
- <footnote_reference id="id4" refid="id11">
- 3
- is 3,
- <footnote_reference auto="1" id="id5" refid="id12">
- 6
- should be 6, \n\
- <problematic id="id15" refid="id14">
- [#]_
- is one too many,
- <footnote_reference auto="1" id="id7" refname="five">
- should be 5, and \n\
- <footnote_reference auto="1" id="id8" refname="eight">
- doesn't exist.
- <footnote backrefs="id3" id="id9" name="1">
- <label>
- 1
- <paragraph>
- Manually-numbered footnote 1.
- <footnote auto="1" backrefs="id2" id="id10" name="2">
- <label>
- 2
- <paragraph>
- Auto-numbered footnote 2.
- <footnote auto="1" backrefs="id1" id="four" name="four">
- <label>
- 4
- <paragraph>
- Auto-numbered footnote 4.
- <footnote backrefs="id4" id="id11" name="3">
- <label>
- 3
- <paragraph>
- Manually-numbered footnote 3
- <footnote auto="1" dupname="five" id="five">
- <label>
- 5
- <paragraph>
- Auto-numbered footnote 5.
- <footnote auto="1" backrefs="id5" id="id12" name="6">
- <label>
- 6
- <paragraph>
- Auto-numbered footnote 6.
- <footnote auto="1" dupname="five" id="id13">
- <label>
- 7
- <system_message backrefs="id13" level="2" type="WARNING">
- <paragraph>
- Duplicate explicit target name: "five".
- <paragraph>
- Auto-numbered footnote 5 again (duplicate).
- <system_message backrefs="id15" id="id14" level="3" type="ERROR">
- <paragraph>
- Too many autonumbered footnote references: only 2 corresponding footnotes available.
-"""],
-["""\
-Referencing a footnote by symbol [*]_.
-
-.. [*] This is an auto-symbol footnote.
-""",
-"""\
-<document>
- <paragraph>
- Referencing a footnote by symbol \n\
- <footnote_reference auto="*" id="id1" refid="id2">
- *
- .
- <footnote auto="*" backrefs="id1" id="id2">
- <label>
- *
- <paragraph>
- This is an auto-symbol footnote.
-"""],
-["""\
-A sequence of symbol footnote references:
-[*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_.
-
-.. [*] Auto-symbol footnote 1.
-.. [*] Auto-symbol footnote 2.
-.. [*] Auto-symbol footnote 3.
-.. [*] Auto-symbol footnote 4.
-.. [*] Auto-symbol footnote 5.
-.. [*] Auto-symbol footnote 6.
-.. [*] Auto-symbol footnote 7.
-.. [*] Auto-symbol footnote 8.
-.. [*] Auto-symbol footnote 9.
-.. [*] Auto-symbol footnote 10.
-.. [*] Auto-symbol footnote 11.
-.. [*] Auto-symbol footnote 12.
-""",
-u"""\
-<document>
- <paragraph>
- A sequence of symbol footnote references:
- <footnote_reference auto="*" id="id1" refid="id13">
- *
- \n\
- <footnote_reference auto="*" id="id2" refid="id14">
- \u2020
- \n\
- <footnote_reference auto="*" id="id3" refid="id15">
- \u2021
- \n\
- <footnote_reference auto="*" id="id4" refid="id16">
- \u00A7
- \n\
- <footnote_reference auto="*" id="id5" refid="id17">
- \u00B6
- \n\
- <footnote_reference auto="*" id="id6" refid="id18">
- #
- \n\
- <footnote_reference auto="*" id="id7" refid="id19">
- \u2660
- \n\
- <footnote_reference auto="*" id="id8" refid="id20">
- \u2665
- \n\
- <footnote_reference auto="*" id="id9" refid="id21">
- \u2666
- \n\
- <footnote_reference auto="*" id="id10" refid="id22">
- \u2663
- \n\
- <footnote_reference auto="*" id="id11" refid="id23">
- **
- \n\
- <footnote_reference auto="*" id="id12" refid="id24">
- \u2020\u2020
- .
- <footnote auto="*" backrefs="id1" id="id13">
- <label>
- *
- <paragraph>
- Auto-symbol footnote 1.
- <footnote auto="*" backrefs="id2" id="id14">
- <label>
- \u2020
- <paragraph>
- Auto-symbol footnote 2.
- <footnote auto="*" backrefs="id3" id="id15">
- <label>
- \u2021
- <paragraph>
- Auto-symbol footnote 3.
- <footnote auto="*" backrefs="id4" id="id16">
- <label>
- \u00A7
- <paragraph>
- Auto-symbol footnote 4.
- <footnote auto="*" backrefs="id5" id="id17">
- <label>
- \u00B6
- <paragraph>
- Auto-symbol footnote 5.
- <footnote auto="*" backrefs="id6" id="id18">
- <label>
- #
- <paragraph>
- Auto-symbol footnote 6.
- <footnote auto="*" backrefs="id7" id="id19">
- <label>
- \u2660
- <paragraph>
- Auto-symbol footnote 7.
- <footnote auto="*" backrefs="id8" id="id20">
- <label>
- \u2665
- <paragraph>
- Auto-symbol footnote 8.
- <footnote auto="*" backrefs="id9" id="id21">
- <label>
- \u2666
- <paragraph>
- Auto-symbol footnote 9.
- <footnote auto="*" backrefs="id10" id="id22">
- <label>
- \u2663
- <paragraph>
- Auto-symbol footnote 10.
- <footnote auto="*" backrefs="id11" id="id23">
- <label>
- **
- <paragraph>
- Auto-symbol footnote 11.
- <footnote auto="*" backrefs="id12" id="id24">
- <label>
- \u2020\u2020
- <paragraph>
- Auto-symbol footnote 12.
-"""],
-])
-
-
-if __name__ == '__main__':
- import unittest
- unittest.main(defaultTest='suite')
diff --git a/docutils/test/test_transforms/test_hyperlinks.py b/docutils/test/test_transforms/test_hyperlinks.py
deleted file mode 100755
index 811b2dcfe..000000000
--- a/docutils/test/test_transforms/test_hyperlinks.py
+++ /dev/null
@@ -1,440 +0,0 @@
-#! /usr/bin/env python
-
-"""
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: This module has been placed in the public domain.
-
-Tests for docutils.transforms.references.Hyperlinks.
-"""
-
-from __init__ import DocutilsTestSupport
-from docutils.transforms.references import Hyperlinks
-from docutils.parsers.rst import Parser
-
-
-def suite():
- parser = Parser()
- s = DocutilsTestSupport.TransformTestSuite(parser)
- s.generateTests(totest)
- return s
-
-totest = {}
-
-# Exhaustive listing of hyperlink variations: every combination of
-# target/reference, direct/indirect, internal/external, and named/anonymous.
-totest['exhaustive_hyperlinks'] = ((Hyperlinks,), [
-["""\
-direct_ external
-
-.. _direct: http://direct
-""",
-"""\
-<document>
- <paragraph>
- <reference refuri="http://direct">
- direct
- external
- <target id="direct" name="direct" refuri="http://direct">
-"""],
-["""\
-indirect_ external
-
-.. _indirect: xtarget_
-.. _xtarget: http://indirect
-""",
-"""\
-<document>
- <paragraph>
- <reference refuri="http://indirect">
- indirect
- external
- <target id="indirect" name="indirect" refuri="http://indirect">
- <target id="xtarget" name="xtarget" refuri="http://indirect">
-"""],
-["""\
-.. _direct:
-
-direct_ internal
-""",
-"""\
-<document>
- <target id="direct" name="direct">
- <paragraph>
- <reference refid="direct">
- direct
- internal
-"""],
-["""\
-.. _ztarget:
-
-indirect_ internal
-
-.. _indirect2: ztarget_
-.. _indirect: indirect2_
-""",
-"""\
-<document>
- <target id="ztarget" name="ztarget">
- <paragraph>
- <reference refid="ztarget">
- indirect
- internal
- <target id="indirect2" name="indirect2" refid="ztarget">
- <target id="indirect" name="indirect" refid="ztarget">
-"""],
-["""\
-Implicit
---------
-
-indirect_ internal
-
-.. _indirect: implicit_
-""",
-"""\
-<document>
- <section id="implicit" name="implicit">
- <title>
- Implicit
- <paragraph>
- <reference refid="implicit">
- indirect
- internal
- <target id="indirect" name="indirect" refid="implicit">
-"""],
-["""\
-Implicit
---------
-
-Duplicate implicit targets.
-
-Implicit
---------
-
-indirect_ internal
-
-.. _indirect: implicit_
-""",
-"""\
-<document>
- <section dupname="implicit" id="implicit">
- <title>
- Implicit
- <paragraph>
- Duplicate implicit targets.
- <section dupname="implicit" id="id1">
- <title>
- Implicit
- <system_message backrefs="id1" level="1" type="INFO">
- <paragraph>
- Duplicate implicit target name: "implicit".
- <paragraph>
- <problematic id="id3" refid="id2">
- indirect_
- internal
- <target id="indirect" name="indirect" refname="implicit">
- <system_message backrefs="id3" id="id2" level="2" type="WARNING">
- <paragraph>
- Indirect hyperlink target "indirect" (id="indirect") refers to target "implicit", which does not exist.
-"""],
-["""\
-`direct external`__
-
-__ http://direct
-""",
-"""\
-<document>
- <paragraph>
- <reference anonymous="1" refuri="http://direct">
- direct external
- <target anonymous="1" id="id1" refuri="http://direct">
-"""],
-["""\
-`indirect external`__
-
-__ xtarget_
-.. _xtarget: http://indirect
-""",
-"""\
-<document>
- <paragraph>
- <reference anonymous="1" refuri="http://indirect">
- indirect external
- <target anonymous="1" id="id1" refuri="http://indirect">
- <target id="xtarget" name="xtarget" refuri="http://indirect">
-"""],
-["""\
-__
-
-`direct internal`__
-""",
-"""\
-<document>
- <target anonymous="1" id="id1">
- <paragraph>
- <reference anonymous="1" refid="id1">
- direct internal
-"""],
-["""\
-.. _ztarget:
-
-`indirect internal`__
-
-__ ztarget_
-""",
-"""\
-<document>
- <target id="ztarget" name="ztarget">
- <paragraph>
- <reference anonymous="1" refid="ztarget">
- indirect internal
- <target anonymous="1" id="id1" refid="ztarget">
-"""],
-["""\
-.. _ztarget:
-
-First
-
-.. _ztarget:
-
-Second
-
-`indirect internal`__
-
-__ ztarget_
-""",
-"""\
-<document>
- <target dupname="ztarget" id="ztarget">
- <paragraph>
- First
- <system_message backrefs="id1" level="2" type="WARNING">
- <paragraph>
- Duplicate explicit target name: "ztarget".
- <target dupname="ztarget" id="id1">
- <paragraph>
- Second
- <paragraph>
- <reference anonymous="1" refid="id1">
- indirect internal
- <target anonymous="1" id="id2" refid="id1">
-"""],
-])
-
-totest['hyperlinks'] = ((Hyperlinks,), [
-["""\
-.. _internal hyperlink:
-
-This paragraph referenced.
-
-By this `internal hyperlink`_ referemce.
-""",
-"""\
-<document>
- <target id="internal-hyperlink" name="internal hyperlink">
- <paragraph>
- This paragraph referenced.
- <paragraph>
- By this \n\
- <reference refid="internal-hyperlink">
- internal hyperlink
- referemce.
-"""],
-["""\
-.. _chained:
-.. _internal hyperlink:
-
-This paragraph referenced.
-
-By this `internal hyperlink`_ referemce
-as well as by this chained_ reference.
-
-The results of the transform are not visible at the XML level.
-""",
-"""\
-<document>
- <target id="chained" name="chained">
- <target id="internal-hyperlink" name="internal hyperlink">
- <paragraph>
- This paragraph referenced.
- <paragraph>
- By this \n\
- <reference refid="internal-hyperlink">
- internal hyperlink
- referemce
- as well as by this \n\
- <reference refid="chained">
- chained
- reference.
- <paragraph>
- The results of the transform are not visible at the XML level.
-"""],
-["""\
-.. _external hyperlink: http://uri
-
-`External hyperlink`_ reference.
-""",
-"""\
-<document>
- <target id="external-hyperlink" name="external hyperlink" refuri="http://uri">
- <paragraph>
- <reference refuri="http://uri">
- External hyperlink
- reference.
-"""],
-["""\
-.. _external hyperlink: http://uri
-.. _indirect target: `external hyperlink`_
-""",
-"""\
-<document>
- <target id="external-hyperlink" name="external hyperlink" refuri="http://uri">
- <target id="indirect-target" name="indirect target" refuri="http://uri">
- <system_message level="1" type="INFO">
- <paragraph>
- Indirect hyperlink target "indirect target" is not referenced.
-"""],
-["""\
-.. _chained:
-.. _external hyperlink: http://uri
-
-`External hyperlink`_ reference
-and a chained_ reference too.
-""",
-"""\
-<document>
- <target id="chained" name="chained" refuri="http://uri">
- <target id="external-hyperlink" name="external hyperlink" refuri="http://uri">
- <paragraph>
- <reference refuri="http://uri">
- External hyperlink
- reference
- and a \n\
- <reference refuri="http://uri">
- chained
- reference too.
-"""],
-["""\
-.. _external hyperlink: http://uri
-.. _indirect hyperlink: `external hyperlink`_
-
-`Indirect hyperlink`_ reference.
-""",
-"""\
-<document>
- <target id="external-hyperlink" name="external hyperlink" refuri="http://uri">
- <target id="indirect-hyperlink" name="indirect hyperlink" refuri="http://uri">
- <paragraph>
- <reference refuri="http://uri">
- Indirect hyperlink
- reference.
-"""],
-["""\
-.. _external hyperlink: http://uri
-.. _chained:
-.. _indirect hyperlink: `external hyperlink`_
-
-Chained_ `indirect hyperlink`_ reference.
-""",
-"""\
-<document>
- <target id="external-hyperlink" name="external hyperlink" refuri="http://uri">
- <target id="chained" name="chained" refuri="http://uri">
- <target id="indirect-hyperlink" name="indirect hyperlink" refuri="http://uri">
- <paragraph>
- <reference refuri="http://uri">
- Chained
- \n\
- <reference refuri="http://uri">
- indirect hyperlink
- reference.
-"""],
-["""\
-.. __: http://full
-__
-__ http://simplified
-.. _external: http://indirect.external
-__ external_
-__
-
-`Full syntax anonymous external hyperlink reference`__,
-`chained anonymous external reference`__,
-`simplified syntax anonymous external hyperlink reference`__,
-`indirect anonymous hyperlink reference`__,
-`internal anonymous hyperlink reference`__.
-""",
-"""\
-<document>
- <target anonymous="1" id="id1" refuri="http://full">
- <target anonymous="1" id="id2" refuri="http://simplified">
- <target anonymous="1" id="id3" refuri="http://simplified">
- <target id="external" name="external" refuri="http://indirect.external">
- <target anonymous="1" id="id4" refuri="http://indirect.external">
- <target anonymous="1" id="id5">
- <paragraph>
- <reference anonymous="1" refuri="http://full">
- Full syntax anonymous external hyperlink reference
- ,
- <reference anonymous="1" refuri="http://simplified">
- chained anonymous external reference
- ,
- <reference anonymous="1" refuri="http://simplified">
- simplified syntax anonymous external hyperlink reference
- ,
- <reference anonymous="1" refuri="http://indirect.external">
- indirect anonymous hyperlink reference
- ,
- <reference anonymous="1" refid="id5">
- internal anonymous hyperlink reference
- .
-"""],
-["""\
-Duplicate external target_'s (different URIs):
-
-.. _target: first
-
-.. _target: second
-""",
-"""\
-<document>
- <paragraph>
- Duplicate external \n\
- <reference refname="target">
- target
- 's (different URIs):
- <target dupname="target" id="target" refuri="first">
- <system_message backrefs="id1" level="2" type="WARNING">
- <paragraph>
- Duplicate explicit target name: "target".
- <target dupname="target" id="id1" refuri="second">
-"""],
-["""\
-Several__ anonymous__ hyperlinks__, but not enough targets.
-
-__ http://example.org
-""",
-"""\
-<document>
- <paragraph>
- <problematic id="id3" refid="id2">
- Several__
- \n\
- <problematic id="id4" refid="id2">
- anonymous__
- \n\
- <problematic id="id5" refid="id2">
- hyperlinks__
- , but not enough targets.
- <target anonymous="1" id="id1" refuri="http://example.org">
- <system_message backrefs="id3 id4 id5" id="id2" level="3" type="ERROR">
- <paragraph>
- Anonymous hyperlink mismatch: 3 references but 1 targets.
-"""],
-])
-
-
-if __name__ == '__main__':
- import unittest
- unittest.main(defaultTest='suite')
diff --git a/docutils/test/test_transforms/test_messages.py b/docutils/test/test_transforms/test_messages.py
deleted file mode 100755
index 6751c3ecd..000000000
--- a/docutils/test/test_transforms/test_messages.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#! /usr/bin/env python
-
-"""
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: This module has been placed in the public domain.
-
-Tests for docutils.transforms.universal.Messages.
-"""
-
-from __init__ import DocutilsTestSupport
-from docutils.transforms.universal import Messages
-from docutils.transforms.references import Substitutions
-from docutils.parsers.rst import Parser
-
-
-def suite():
- parser = Parser()
- s = DocutilsTestSupport.TransformTestSuite(parser)
- s.generateTests(totest)
- return s
-
-totest = {}
-
-totest['system_message_sections'] = ((Substitutions, Messages,), [
-["""\
-This |unknown substitution| will generate a system message, thanks to
-the ``Substitutions`` transform. The ``Messages`` transform will
-generate a "System Messages" section.
-
-(A second copy of the system message is tacked on to the end of the
-doctree by the test framework.)
-""",
-"""\
-<document>
- <paragraph>
- This \n\
- <problematic id="id2" refid="id1">
- |unknown substitution|
- will generate a system message, thanks to
- the \n\
- <literal>
- Substitutions
- transform. The \n\
- <literal>
- Messages
- transform will
- generate a "System Messages" section.
- <paragraph>
- (A second copy of the system message is tacked on to the end of the
- doctree by the test framework.)
- <section class="system-messages">
- <title>
- Docutils System Messages
- <system_message backrefs="id2" id="id1" level="3" type="ERROR">
- <paragraph>
- Undefined substitution referenced: "unknown substitution".
-"""],
-])
-
-
-if __name__ == '__main__':
- import unittest
- unittest.main(defaultTest='suite')
diff --git a/docutils/test/test_transforms/test_substitutions.py b/docutils/test/test_transforms/test_substitutions.py
deleted file mode 100755
index c02dd0218..000000000
--- a/docutils/test/test_transforms/test_substitutions.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#! /usr/bin/env python
-
-"""
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: This module has been placed in the public domain.
-
-Tests for docutils.transforms.references.Substitutions.
-"""
-
-from __init__ import DocutilsTestSupport
-from docutils.transforms.references import Substitutions
-from docutils.parsers.rst import Parser
-
-
-def suite():
- parser = Parser()
- s = DocutilsTestSupport.TransformTestSuite(parser)
- s.generateTests(totest)
- return s
-
-totest = {}
-
-totest['substitutions'] = ((Substitutions,), [
-["""\
-The |biohazard| symbol is deservedly scary-looking.
-
-.. |biohazard| image:: biohazard.png
-""",
-"""\
-<document>
- <paragraph>
- The
- <image alt="biohazard" uri="biohazard.png">
- symbol is deservedly scary-looking.
- <substitution_definition name="biohazard">
- <image alt="biohazard" uri="biohazard.png">
-"""],
-["""\
-Here's an |unknown| substitution.
-""",
-"""\
-<document>
- <paragraph>
- Here's an
- <problematic id="id2" refid="id1">
- |unknown|
- substitution.
- <system_message backrefs="id2" id="id1" level="3" type="ERROR">
- <paragraph>
- Undefined substitution referenced: "unknown".
-"""],
-])
-
-
-if __name__ == '__main__':
- import unittest
- unittest.main(defaultTest='suite')