summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_htmlparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rwxr-xr-xLib/test/test_htmlparser.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index 54b90cd..c45cf00 100755
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -2,7 +2,6 @@
import HTMLParser
import pprint
-import sys
import unittest
from test import test_support
@@ -309,6 +308,18 @@ DOCTYPE html [
("endtag", "script"),
])
+ def test_entityrefs_in_attributes(self):
+ self._run_check("<html foo='&euro;&amp;&#97;&#x61;&unsupported;'>", [
+ ("starttag", "html", [("foo", u"\u20AC&aa&unsupported;")])
+ ])
+
+ def test_malformatted_charref(self):
+ self._run_check("<p>&#bad;</p>", [
+ ("starttag", "p", []),
+ ("data", "&#bad;"),
+ ("endtag", "p"),
+ ])
+
def test_main():
test_support.run_unittest(HTMLParserTestCase)