diff options
Diffstat (limited to 'Lib/test/test_htmlparser.py')
| -rwxr-xr-x | Lib/test/test_htmlparser.py | 13 |
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='€&aa&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) |
