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_lxml.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test_lxml.py') diff --git a/tests/test_lxml.py b/tests/test_lxml.py index c2b40c3..4b3df07 100644 --- a/tests/test_lxml.py +++ b/tests/test_lxml.py @@ -425,6 +425,15 @@ class TestLXMLBuilderInvalidMarkup(SoupTest): # Also compare html5lib, which preserves the &# before the # entity name. + def test_entity_out_of_range(self): + # An entity that's out of range will be ignored. + soup = self.soup("

") + self.assertEquals(soup.p.string, None) + + soup = self.soup("

") + self.assertEquals(soup.p.string, None) + + def test_entity_was_not_finished(self): soup = self.soup("

<Hello>") # Compare html5lib, which completes the entity. -- cgit v1.2.3