From f93d5bf81e56515098785068a18f2befec37857a Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 13 Feb 2011 21:42:50 -0500 Subject: Ported more tests of bad declarations. --- tests/test_lxml.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/test_lxml.py') diff --git a/tests/test_lxml.py b/tests/test_lxml.py index cba5522..6adc2b3 100644 --- a/tests/test_lxml.py +++ b/tests/test_lxml.py @@ -302,6 +302,17 @@ class TestLXMLBuilderInvalidMarkup(SoupTest): # Declarations that don't make any sense are ignored. self.assertSoupEquals('

a

', "

a

") + def test_whitespace_in_doctype(self): + # A declaration that has extra whitespace is ignored. + self.assertSoupEquals( + ('' + '

foo

'), + '

foo

') + + def test_incomplete_declaration(self): + # An incomplete declaration will screw up the rest of the document. + self.assertSoupEquals('ac', '

a

') + def test_cdata_where_it_doesnt_belong(self): #CDATA sections are ignored. markup = "
" -- cgit v1.2.3