From 082a8c84a79fa33ea23c159495005ebe9a39cbf4 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 27 Feb 2011 22:11:08 -0500 Subject: Added tests to verify that bug 606662 is fixed. --- tests/test_html5lib.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test_html5lib.py') diff --git a/tests/test_html5lib.py b/tests/test_html5lib.py index b9bdd1d..ac99832 100644 --- a/tests/test_html5lib.py +++ b/tests/test_html5lib.py @@ -200,6 +200,15 @@ class TestHTML5BuilderInvalidMarkup(TestLXMLBuilderInvalidMarkup): soup = self.soup("

foodbaz

") self.assertEquals(soup.p.string, "foodbaz") + def test_entity_out_of_range(self): + # An entity that's out of range will be converted to + # REPLACEMENT CHARACTER. + soup = self.soup("

") + self.assertEquals(soup.p.string, u"\N{REPLACEMENT CHARACTER}") + + soup = self.soup("

") + self.assertEquals(soup.p.string, u"\N{REPLACEMENT CHARACTER}") + class TestHTML5LibEncodingConversion(TestLXMLBuilderEncodingConversion): @property -- cgit v1.2.3