4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
8 Tests for inline markup in docutils/parsers/rst/states.py.
9 Interpreted text tests are in a separate module, test_interpreted.py.
12 from __init__
import DocutilsTestSupport
15 s
= DocutilsTestSupport
.ParserTestSuite()
16 s
.generateTests(totest
)
21 totest
['emphasis'] = [
26 <document source="test data">
32 l'*emphasis* and l\u2019*emphasis* with apostrophe
35 <document source="test data">
50 <document source="test data">
57 *emphasis without closing asterisk
60 <document source="test data">
62 <problematic ids="id2" refid="id1">
64 emphasis without closing asterisk
65 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
67 Inline emphasis start-string without end-string.
70 '*emphasis*' and 1/*emphasis*/2 and 3-*emphasis*-4 and 5:*emphasis*:6
71 but not '*' or '"*"' or x*2* or 2*x* or \*args or *
72 or *the\* *stars\\\* *inside*
74 (however, '*args' will trigger a warning and may be problematic)
79 <document source="test data">
94 but not '*' or '"*"' or x*2* or 2*x* or *args or *
100 <problematic ids="id2" refid="id1">
102 args' will trigger a warning and may be problematic)
103 <system_message backrefs="id2" ids="id1" level="2" line="6" source="test data" type="WARNING">
105 Inline emphasis start-string without end-string.
113 quoted '*emphasis*', quoted "*emphasis*",
114 quoted \u2018*emphasis*\u2019, quoted \u201c*emphasis*\u201d,
115 quoted \xab*emphasis*\xbb
118 <document source="test data">
130 \u2019, quoted \u201c
140 Emphasized asterisk: *\**
142 Emphasized double asterisk: *\***
145 <document source="test data">
147 Emphasized asterisk: \n\
151 Emphasized double asterisk: \n\
162 <document source="test data">
168 l'**strong** and l\u2019**strong** with apostrophe
171 <document source="test data">
182 quoted '**strong**', quoted "**strong**",
183 quoted \u2018**strong**\u2019, quoted \u201c**strong**\u201d,
184 quoted \xab**strong**\xbb
187 <document source="test data">
199 \u2019, quoted \u201c
209 (**strong**) but not (**) or '(** ' or x**2 or \**kwargs or **
211 (however, '**kwargs' will trigger a warning and may be problematic)
214 <document source="test data">
219 ) but not (**) or '(** ' or x**2 or **kwargs or **
222 <problematic ids="id2" refid="id1">
224 kwargs' will trigger a warning and may be problematic)
225 <system_message backrefs="id2" ids="id1" level="2" line="4" source="test data" type="WARNING">
227 Inline strong start-string without end-string.
230 Strong asterisk: *****
232 Strong double asterisk: ******
235 <document source="test data">
241 Strong double asterisk: \n\
246 **strong without closing asterisks
249 <document source="test data">
251 <problematic ids="id2" refid="id1">
253 strong without closing asterisks
254 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
256 Inline strong start-string without end-string.
260 totest
['literal'] = [
265 <document source="test data">
274 <document source="test data">
283 <document source="test data">
292 <document source="test data">
298 l'``literal`` and l\u2019``literal`` with apostrophe
301 <document source="test data">
312 quoted '``literal``', quoted "``literal``",
313 quoted \u2018``literal``\u2019, quoted \u201c``literal``\u201d,
314 quoted \xab``literal``\xbb
317 <document source="test data">
329 \u2019, quoted \u201c
339 ``'literal'`` with quotes, ``"literal"`` with quotes,
340 ``\u2018literal\u2019`` with quotes, ``\u201cliteral\u201d`` with quotes,
341 ``\xabliteral\xbb`` with quotes
344 <document source="test data">
363 ``literal ``TeX quotes'' & \backslash`` but not "``" or ``
365 (however, ``standalone TeX quotes'' will trigger a warning
366 and may be problematic)
369 <document source="test data">
372 literal ``TeX quotes'' & \\backslash
376 <problematic ids="id2" refid="id1">
378 standalone TeX quotes'' will trigger a warning
379 and may be problematic)
380 <system_message backrefs="id2" ids="id1" level="2" line="4" source="test data" type="WARNING">
382 Inline literal start-string without end-string.
385 Find the ```interpreted text``` in this paragraph!
388 <document source="test data">
396 ``literal without closing backquotes
399 <document source="test data">
401 <problematic ids="id2" refid="id1">
403 literal without closing backquotes
404 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
406 Inline literal start-string without end-string.
409 Python ``list``\s use square bracket syntax.
412 <document source="test data">
417 s use square bracket syntax.
421 totest
['references'] = [
426 <document source="test data">
428 <reference name="ref" refname="ref">
432 l'ref_ and l\u2019ref_ with apostrophe
435 <document source="test data">
438 <reference name="ref" refname="ref">
441 <reference name="ref" refname="ref">
446 quoted 'ref_', quoted "ref_",
447 quoted \u2018ref_\u2019, quoted \u201cref_\u201d,
449 but not 'ref ref'_, "ref ref"_, \u2018ref ref\u2019_,
450 \u201cref ref\u201d_, or \xabref ref\xbb_
453 <document source="test data">
456 <reference name="ref" refname="ref">
459 <reference name="ref" refname="ref">
463 <reference name="ref" refname="ref">
465 \u2019, quoted \u201c
466 <reference name="ref" refname="ref">
470 <reference name="ref" refname="ref">
473 but not 'ref ref'_, "ref ref"_, \u2018ref ref\u2019_,
474 \u201cref ref\u201d_, or \xabref ref\xbb_
480 <document source="test data">
482 <reference anonymous="1" name="ref">
486 l'ref__ and l\u2019ref__ with apostrophe
489 <document source="test data">
492 <reference anonymous="1" name="ref">
495 <reference anonymous="1" name="ref">
500 quoted 'ref__', quoted "ref__",
501 quoted \u2018ref__\u2019, quoted \u201cref__\u201d,
502 quoted \xabref__\xbb,
503 but not 'ref ref'__, "ref ref"__, \u2018ref ref\u2019__,
504 \u201cref ref\u201d__, or \xabref ref\xbb__
507 <document source="test data">
510 <reference anonymous="1" name="ref">
513 <reference anonymous="1" name="ref">
517 <reference anonymous="1" name="ref">
519 \u2019, quoted \u201c
520 <reference anonymous="1" name="ref">
524 <reference anonymous="1" name="ref">
527 but not 'ref ref'__, "ref ref"__, \u2018ref ref\u2019__,
528 \u201cref ref\u201d__, or \xabref ref\xbb__
531 ref_, r_, r_e-f_, -ref_, and anonymousref__,
532 but not _ref_ or __attr__ or object.__attr__
535 <document source="test data">
537 <reference name="ref" refname="ref">
540 <reference name="r" refname="r">
543 <reference name="r_e-f" refname="r_e-f">
546 <reference name="ref" refname="ref">
549 <reference anonymous="1" name="anonymousref">
552 but not _ref_ or __attr__ or object.__attr__
556 totest
['phrase_references'] = [
561 <document source="test data">
563 <reference name="phrase reference" refname="phrase reference">
567 l'`phrase reference`_ and l\u2019`phrase reference`_ with apostrophe
570 <document source="test data">
573 <reference name="phrase reference" refname="phrase reference">
576 <reference name="phrase reference" refname="phrase reference">
581 quoted '`phrase reference`_', quoted "`phrase reference`_",
582 quoted \u2018`phrase reference`_\u2019,
583 quoted \u201c`phrase reference`_\u201d,
584 quoted \xab`phrase reference`_\xbb
587 <document source="test data">
590 <reference name="phrase reference" refname="phrase reference">
593 <reference name="phrase reference" refname="phrase reference">
597 <reference name="phrase reference" refname="phrase reference">
601 <reference name="phrase reference" refname="phrase reference">
605 <reference name="phrase reference" refname="phrase reference">
610 `'phrase reference'`_ with quotes, `"phrase reference"`_ with quotes,
611 `\u2018phrase reference\u2019`_ with quotes,
612 `\u201cphrase reference\u201d`_ with quotes,
613 `\xabphrase reference\xbb`_ with quotes
616 <document source="test data">
618 <reference name="'phrase reference'" refname="'phrase reference'">
621 <reference name=""phrase reference"" refname=""phrase reference"">
624 <reference name="\u2018phrase reference\u2019" refname="\u2018phrase reference\u2019">
625 \u2018phrase reference\u2019
627 <reference name="\u201cphrase reference\u201d" refname="\u201cphrase reference\u201d">
628 \u201cphrase reference\u201d
630 <reference name="\xabphrase reference\xbb" refname="\xabphrase reference\xbb">
631 \xabphrase reference\xbb
635 `anonymous reference`__
638 <document source="test data">
640 <reference anonymous="1" name="anonymous reference">
644 l'`anonymous reference`__ and l\u2019`anonymous reference`__ with apostrophe
647 <document source="test data">
650 <reference anonymous="1" name="anonymous reference">
653 <reference anonymous="1" name="anonymous reference">
658 quoted '`anonymous reference`__', quoted "`anonymous reference`__",
659 quoted \u2018`anonymous reference`__\u2019,
660 quoted \u201c`anonymous reference`__\u201d,
661 quoted \xab`anonymous reference`__\xbb
664 <document source="test data">
667 <reference anonymous="1" name="anonymous reference">
670 <reference anonymous="1" name="anonymous reference">
674 <reference anonymous="1" name="anonymous reference">
678 <reference anonymous="1" name="anonymous reference">
682 <reference anonymous="1" name="anonymous reference">
687 `'anonymous reference'`__ with quotes, `"anonymous reference"`__ with quotes,
688 `\u2018anonymous reference\u2019`__ with quotes,
689 `\u201canonymous reference\u201d`__ with quotes,
690 `\xabanonymous reference\xbb`__ with quotes
693 <document source="test data">
695 <reference anonymous="1" name="'anonymous reference'">
696 'anonymous reference'
698 <reference anonymous="1" name=""anonymous reference"">
699 "anonymous reference"
701 <reference anonymous="1" name="\u2018anonymous reference\u2019">
702 \u2018anonymous reference\u2019
704 <reference anonymous="1" name="\u201canonymous reference\u201d">
705 \u201canonymous reference\u201d
707 <reference anonymous="1" name="\xabanonymous reference\xbb">
708 \xabanonymous reference\xbb
716 <document source="test data">
718 <reference name="phrase reference across lines" refname="phrase reference across lines">
723 `phrase\`_ reference`_
726 <document source="test data">
728 <reference name="phrase`_ reference" refname="phrase`_ reference">
732 Invalid phrase reference:
734 :role:`phrase reference`_
737 <document source="test data">
739 Invalid phrase reference:
741 <problematic ids="id2" refid="id1">
742 :role:`phrase reference`_
743 <system_message backrefs="id2" ids="id1" level="2" line="3" source="test data" type="WARNING">
745 Mismatch: both interpreted text role prefix and reference suffix.
748 Invalid phrase reference:
750 `phrase reference`:role:_
753 <document source="test data">
755 Invalid phrase reference:
757 <problematic ids="id2" refid="id1">
758 `phrase reference`:role:_
759 <system_message backrefs="id2" ids="id1" level="2" line="3" source="test data" type="WARNING">
761 Mismatch: both interpreted text role suffix and reference suffix.
764 `phrase reference_ without closing backquote
767 <document source="test data">
769 <problematic ids="id2" refid="id1">
772 <reference name="reference" refname="reference">
774 without closing backquote
775 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
777 Inline interpreted text or phrase reference start-string without end-string.
780 `anonymous phrase reference__ without closing backquote
783 <document source="test data">
785 <problematic ids="id2" refid="id1">
788 <reference anonymous="1" name="reference">
790 without closing backquote
791 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
793 Inline interpreted text or phrase reference start-string without end-string.
797 totest
['embedded_URIs'] = [
799 `phrase reference <http://example.com>`_
802 <document source="test data">
804 <reference name="phrase reference" refuri="http://example.com">
806 <target ids="phrase-reference" names="phrase\ reference" refuri="http://example.com">
809 `anonymous reference <http://example.com>`__
812 <document source="test data">
814 <reference name="anonymous reference" refuri="http://example.com">
818 `embedded URI on next line
819 <http://example.com>`__
822 <document source="test data">
824 <reference name="embedded URI on next line" refuri="http://example.com">
825 embedded URI on next line
828 `embedded URI across lines <http://example.com/
832 <document source="test data">
834 <reference name="embedded URI across lines" refuri="http://example.com/long/path">
835 embedded URI across lines
838 `embedded URI with whitespace <http://example.com/
839 long/path /and /whitespace>`__
842 <document source="test data">
844 <reference name="embedded URI with whitespace" refuri="http://example.com/long/path/and/whitespace">
845 embedded URI with whitespace
848 `embedded email address <jdoe@example.com>`__
850 `embedded email address broken across lines <jdoe
854 <document source="test data">
856 <reference name="embedded email address" refuri="mailto:jdoe@example.com">
857 embedded email address
859 <reference name="embedded email address broken across lines" refuri="mailto:jdoe@example.com">
860 embedded email address broken across lines
863 `embedded URI with too much whitespace < http://example.com/
864 long/path /and /whitespace >`__
866 `embedded URI with too much whitespace at end <http://example.com/
867 long/path /and /whitespace >`__
869 `embedded URI with no preceding whitespace<http://example.com>`__
871 `escaped URI \<http://example.com>`__
873 See `HTML Anchors: \<a>`_.
876 <document source="test data">
878 <reference anonymous="1" name="embedded URI with too much whitespace < http://example.com/ long/path /and /whitespace >">
879 embedded URI with too much whitespace < http://example.com/
880 long/path /and /whitespace >
882 <reference anonymous="1" name="embedded URI with too much whitespace at end <http://example.com/ long/path /and /whitespace >">
883 embedded URI with too much whitespace at end <http://example.com/
884 long/path /and /whitespace >
886 <reference anonymous="1" name="embedded URI with no preceding whitespace<http://example.com>">
887 embedded URI with no preceding whitespace<http://example.com>
889 <reference anonymous="1" name="escaped URI <http://example.com>">
890 escaped URI <http://example.com>
893 <reference name="HTML Anchors: <a>" refname="html anchors: <a>">
898 Relative URIs' reference text can be omitted:
905 <document source="test data">
907 Relative URIs' reference text can be omitted:
909 <reference name="reference" refuri="reference">
911 <target ids="reference" names="reference" refuri="reference">
913 <reference name="anonymous" refuri="anonymous">
918 totest
['inline_targets'] = [
922 Here is _`another target` in some text. And _`yet
923 another target`, spanning lines.
925 _`Here is a TaRgeT` with case and spacial difficulties.
928 <document source="test data">
930 <target ids="target" names="target">
934 <target ids="another-target" names="another\ target">
936 in some text. And \n\
937 <target ids="yet-another-target" names="yet\ another\ target">
942 <target ids="here-is-a-target" names="here\ is\ a\ target">
944 with case and spacial difficulties.
947 l'_`target1` and l\u2019_`target2` with apostrophe
950 <document source="test data">
953 <target ids="target1" names="target1">
956 <target ids="target2" names="target2">
961 quoted '_`target1`', quoted "_`target2`",
962 quoted \u2018_`target3`\u2019, quoted \u201c_`target4`\u201d,
963 quoted \xab_`target5`\xbb
966 <document source="test data">
969 <target ids="target1" names="target1">
972 <target ids="target2" names="target2">
976 <target ids="target3" names="target3">
978 \u2019, quoted \u201c
979 <target ids="target4" names="target4">
983 <target ids="target5" names="target5">
988 _`'target1'` with quotes, _`"target2"` with quotes,
989 _`\u2018target3\u2019` with quotes, _`\u201ctarget4\u201d` with quotes,
990 _`\xabtarget5\xbb` with quotes
993 <document source="test data">
995 <target ids="target1" names="'target1'">
998 <target ids="target2" names=""target2"">
1001 <target ids="target3" names="\u2018target3\u2019">
1004 <target ids="target4" names="\u201ctarget4\u201d">
1007 <target ids="target5" names="\xabtarget5\xbb">
1012 But this isn't a _target; targets require backquotes.
1014 And _`this`_ is just plain confusing.
1017 <document source="test data">
1019 But this isn't a _target; targets require backquotes.
1022 <problematic ids="id2" refid="id1">
1024 this`_ is just plain confusing.
1025 <system_message backrefs="id2" ids="id1" level="2" line="3" source="test data" type="WARNING">
1027 Inline target start-string without end-string.
1030 _`inline target without closing backquote
1033 <document source="test data">
1035 <problematic ids="id2" refid="id1">
1037 inline target without closing backquote
1038 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
1040 Inline target start-string without end-string.
1044 totest
['footnote_reference'] = [
1049 <document source="test data">
1051 <footnote_reference ids="id1" refname="1">
1058 <document source="test data">
1060 <footnote_reference auto="1" ids="id1">
1066 <document source="test data">
1068 <footnote_reference auto="1" ids="id1" refname="label">
1074 <document source="test data">
1076 <footnote_reference auto="*" ids="id1">
1079 Adjacent footnote refs are not possible: [*]_[#label]_ [#]_[2]_ [1]_[*]_
1082 <document source="test data">
1084 Adjacent footnote refs are not possible: [*]_[#label]_ [#]_[2]_ [1]_[*]_
1088 totest
['citation_reference'] = [
1093 <document source="test data">
1095 <citation_reference ids="id1" refname="citation">
1099 [citation]_ and [cit-ation]_ and [cit.ation]_ and [CIT1]_ but not [CIT 1]_
1102 <document source="test data">
1104 <citation_reference ids="id1" refname="citation">
1107 <citation_reference ids="id2" refname="cit-ation">
1110 <citation_reference ids="id3" refname="cit.ation">
1113 <citation_reference ids="id4" refname="cit1">
1118 Adjacent citation refs are not possible: [citation]_[CIT1]_
1121 <document source="test data">
1123 Adjacent citation refs are not possible: [citation]_[CIT1]_
1127 totest
['substitution_references'] = [
1132 <document source="test data">
1134 <substitution_reference refname="subref">
1138 |subref|_ and |subref|__
1141 <document source="test data">
1143 <reference refname="subref">
1144 <substitution_reference refname="subref">
1147 <reference anonymous="1">
1148 <substitution_reference refname="subref">
1152 |substitution reference|
1155 <document source="test data">
1157 <substitution_reference refname="substitution reference">
1158 substitution reference
1165 <document source="test data">
1167 <substitution_reference refname="substitution reference">
1172 |substitution reference without closing verbar
1175 <document source="test data">
1177 <problematic ids="id2" refid="id1">
1179 substitution reference without closing verbar
1180 <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
1182 Inline substitution_reference start-string without end-string.
1185 first | then || and finally |||
1188 <document source="test data">
1190 first | then || and finally |||
1194 totest
['standalone_hyperlink'] = [
1196 http://www.standalone.hyperlink.com
1198 http:/one-slash-only.absolute.path
1200 [http://example.com]
1202 (http://example.com)
1204 <http://example.com>
1206 http://[1080:0:0:0:8:800:200C:417A]/IPv6address.html
1208 http://[3ffe:2a00:100:7031::1] (the final "]" is ambiguous in text)
1210 http://[3ffe:2a00:100:7031::1]/
1212 mailto:someone@somewhere.com
1214 news:comp.lang.python
1216 An email address in a sentence: someone@somewhere.com.
1218 ftp://ends.with.a.period.
1220 (a.question.mark@end?)
1223 <document source="test data">
1225 <reference refuri="http://www.standalone.hyperlink.com">
1226 http://www.standalone.hyperlink.com
1228 <reference refuri="http:/one-slash-only.absolute.path">
1229 http:/one-slash-only.absolute.path
1232 <reference refuri="http://example.com">
1237 <reference refuri="http://example.com">
1242 <reference refuri="http://example.com">
1246 <reference refuri="http://[1080:0:0:0:8:800:200C:417A]/IPv6address.html">
1247 http://[1080:0:0:0:8:800:200C:417A]/IPv6address.html
1249 <reference refuri="http://[3ffe:2a00:100:7031::1">
1250 http://[3ffe:2a00:100:7031::1
1251 ] (the final "]" is ambiguous in text)
1253 <reference refuri="http://[3ffe:2a00:100:7031::1]/">
1254 http://[3ffe:2a00:100:7031::1]/
1256 <reference refuri="mailto:someone@somewhere.com">
1257 mailto:someone@somewhere.com
1259 <reference refuri="news:comp.lang.python">
1260 news:comp.lang.python
1262 An email address in a sentence: \n\
1263 <reference refuri="mailto:someone@somewhere.com">
1264 someone@somewhere.com
1267 <reference refuri="ftp://ends.with.a.period">
1268 ftp://ends.with.a.period
1272 <reference refuri="mailto:a.question.mark@end">
1277 Valid URLs with escaped markup characters:
1279 http://example.com/\*content\*/whatever
1281 http://example.com/\*content*/whatever
1284 <document source="test data">
1286 Valid URLs with escaped markup characters:
1288 <reference refuri="http://example.com/*content*/whatever">
1289 http://example.com/*content*/whatever
1291 <reference refuri="http://example.com/*content*/whatever">
1292 http://example.com/*content*/whatever
1295 Valid URLs may end with punctuation inside "<>":
1297 <http://example.org/ends-with-dot.>
1300 <document source="test data">
1302 Valid URLs may end with punctuation inside "<>":
1305 <reference refuri="http://example.org/ends-with-dot.">
1306 http://example.org/ends-with-dot.
1310 Valid URLs with interesting endings:
1312 http://example.org/ends-with-pluses++
1315 <document source="test data">
1317 Valid URLs with interesting endings:
1319 <reference refuri="http://example.org/ends-with-pluses++">
1320 http://example.org/ends-with-pluses++
1323 None of these are standalone hyperlinks (their "schemes"
1324 are not recognized): signal:noise, a:b.
1327 <document source="test data">
1329 None of these are standalone hyperlinks (their "schemes"
1330 are not recognized): signal:noise, a:b.
1333 Escaped email addresses are not recognized: test\@example.org
1336 <document source="test data">
1338 Escaped email addresses are not recognized: test@example.org
1342 totest
['markup recognition rules'] = [
1344 __This__ should be left alone.
1347 <document source="test data">
1349 __This__ should be left alone.
1352 Character-level m\ *a*\ **r**\ ``k``\ `u`:title:\p
1353 with backslash-escaped whitespace, including new\
1357 <document source="test data">
1369 with backslash-escaped whitespace, including newlines.
1372 text-*separated*\u2010*by*\u2011*various*\u2012*dashes*\u2013*and*\u2014*hyphens*.
1373 \u00bf*punctuation*? \u00a1*examples*!\u00a0*\u00a0no-break-space\u00a0*.
1376 <document source="test data">
1405 \u00a0no-break-space\u00a0
1408 # Whitespace characters:
1409 # \u180e*MONGOLIAN VOWEL SEPARATOR*\u180e, fails in Python 2.4
1413 or *space* or one of
1414 \xa0*NO-BREAK SPACE*\xa0,
1415 \u1680*OGHAM SPACE MARK*\u1680,
1416 \u2000*EN QUAD*\u2000,
1417 \u2001*EM QUAD*\u2001,
1418 \u2002*EN SPACE*\u2002,
1419 \u2003*EM SPACE*\u2003,
1420 \u2004*THREE-PER-EM SPACE*\u2004,
1421 \u2005*FOUR-PER-EM SPACE*\u2005,
1422 \u2006*SIX-PER-EM SPACE*\u2006,
1423 \u2007*FIGURE SPACE*\u2007,
1424 \u2008*PUNCTUATION SPACE*\u2008,
1425 \u2009*THIN SPACE*\u2009,
1426 \u200a*HAIR SPACE*\u200a,
1427 \u202f*NARROW NO-BREAK SPACE*\u202f,
1428 \u205f*MEDIUM MATHEMATICAL SPACE*\u205f,
1429 \u3000*IDEOGRAPHIC SPACE*\u3000,
1430 \u2028*LINE SEPARATOR*\u2028
1433 <document source="test data">
1497 NARROW NO-BREAK SPACE
1501 MEDIUM MATHEMATICAL SPACE
1512 None of these should be markup (matched openers & closers):
1514 \u2018*\u2019 \u201c*\u201d \xab*\xbb \u00bf*? \u00a1*!
1521 <document source="test data">
1523 None of these should be markup (matched openers & closers):
1525 \u2018*\u2019 \u201c*\u201d \xab*\xbb \xbf*? \xa1*!
1537 if __name__
== '__main__':
1539 unittest
.main(defaultTest
='suite')