Website: add template and basic stylesheet with menu. Update buildhtml.py (and theref...
[docutils.git] / sandbox / gitpull / web_stylesheet_and_menu / test / test_readers / test_pep / test_inline_markup.py
blobedc0dd2877211fcc149258e770c95460685b1b0e
1 #! /usr/bin/env python
3 # $Id$
4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
7 """
8 Tests for inline markup in PEPs (readers/pep.py).
9 """
11 from __init__ import DocutilsTestSupport
14 def suite():
15 s = DocutilsTestSupport.PEPParserTestSuite()
16 s.generateTests(totest)
17 return s
20 totest = {}
22 totest['standalone_references'] = [
23 ["""\
24 See PEP 287 (pep-0287.txt),
25 and RFC 2822 (which obsoletes RFC822 and RFC-733).
26 """,
27 """\
28 <document source="test data">
29 <paragraph>
30 See \n\
31 <reference refuri="http://www.python.org/dev/peps/pep-0287">
32 PEP 287
34 <reference refuri="http://www.python.org/dev/peps/pep-0287">
35 pep-0287.txt
37 and \n\
38 <reference refuri="http://tools.ietf.org/html/rfc2822.html">
39 RFC 2822
40 (which obsoletes \n\
41 <reference refuri="http://tools.ietf.org/html/rfc822.html">
42 RFC822
43 and \n\
44 <reference refuri="http://tools.ietf.org/html/rfc733.html">
45 RFC-733
47 """],
48 ["""\
49 References split across lines:
51 PEP
52 287
54 RFC
55 2822
56 """,
57 """\
58 <document source="test data">
59 <paragraph>
60 References split across lines:
61 <paragraph>
62 <reference refuri="http://www.python.org/dev/peps/pep-0287">
63 PEP
64 287
65 <paragraph>
66 <reference refuri="http://tools.ietf.org/html/rfc2822.html">
67 RFC
68 2822
69 """],
70 ["""\
71 Test PEP-specific implicit references before a URL:
73 PEP 287 (http://www.python.org/dev/peps/pep-0287), RFC 2822.
74 """,
75 """\
76 <document source="test data">
77 <paragraph>
78 Test PEP-specific implicit references before a URL:
79 <paragraph>
80 <reference refuri="http://www.python.org/dev/peps/pep-0287">
81 PEP 287
83 <reference refuri="http://www.python.org/dev/peps/pep-0287">
84 http://www.python.org/dev/peps/pep-0287
85 ), \n\
86 <reference refuri="http://tools.ietf.org/html/rfc2822.html">
87 RFC 2822
89 """],
92 totest['miscellaneous'] = [
93 ["""\
94 For *completeness*, _`let's` ``test`` **other** forms_
95 |of| `inline markup` [*]_.
97 .. [*] See http://docutils.sf.net/docs/ref/rst/restructuredtext.html.
98 """,
99 """\
100 <document source="test data">
101 <paragraph>
102 For \n\
103 <emphasis>
104 completeness
105 , \n\
106 <target ids="let-s" names="let's">
107 let's
109 <literal>
110 test
112 <strong>
113 other
115 <reference name="forms" refname="forms">
116 forms
118 <substitution_reference refname="of">
121 <title_reference>
122 inline markup
124 <footnote_reference auto="*" ids="id1">
126 <footnote auto="*" ids="id2">
127 <paragraph>
128 See \n\
129 <reference refuri="http://docutils.sf.net/docs/ref/rst/restructuredtext.html">
130 http://docutils.sf.net/docs/ref/rst/restructuredtext.html
132 """],
136 if __name__ == '__main__':
137 import unittest
138 unittest.main(defaultTest='suite')