summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-12-03 16:44:09 (GMT)
committerFred Drake <fdrake@acm.org>2001-12-03 16:44:09 (GMT)
commit073148c4ef807732eaf42df4b7178cecfa0b58dc (patch)
treefbe07af22c818c748cd056eb0adf89fa12733255
parentf07125ee53efcb29c83c051d6efee7c04df69a16 (diff)
downloadcpython-073148c4ef807732eaf42df4b7178cecfa0b58dc.zip
cpython-073148c4ef807732eaf42df4b7178cecfa0b58dc.tar.gz
cpython-073148c4ef807732eaf42df4b7178cecfa0b58dc.tar.bz2
Add a test that makes sure unclosed entity references are handled consitently.
-rwxr-xr-xLib/test/test_htmlparser.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index 85e60e6..9d60dd8 100755
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -134,6 +134,12 @@ text
("data", "\n"),
])
+ def test_unclosed_entityref(self):
+ self._run_check("&entityref foo", [
+ ("entityref", "entityref"),
+ ("data", " foo"),
+ ])
+
def test_doctype_decl(self):
inside = """\
DOCTYPE html [