From 660ec0cf6b64f2ab3e3aac108b8be9c5037f18a1 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 27 Feb 2011 21:59:20 -0500 Subject: Added test to verify that bug 403640 is fixed. --- tests/test_lxml.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test_lxml.py') diff --git a/tests/test_lxml.py b/tests/test_lxml.py index 7e83eff..36f0340 100644 --- a/tests/test_lxml.py +++ b/tests/test_lxml.py @@ -400,6 +400,10 @@ class TestLXMLBuilderInvalidMarkup(SoupTest): self.assertEquals(soup.a['bar'], '') self.assertEquals(soup.a.string, "baz") + def test_unquoted_attribute_value(self): + soup = self.soup('') + self.assertEquals(soup.a['style'], '{height:21px;}') + def test_attribute_value_with_embedded_brackets(self): soup = self.soup('') self.assertEquals(soup.a['b'], '') -- cgit v1.2.3 From 1fc68b4ffb4f0d46211aa23d814926e2bd685473 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 27 Feb 2011 22:05:13 -0500 Subject: Added a test to verify that bug 369897 is fixed. --- tests/test_lxml.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_lxml.py') diff --git a/tests/test_lxml.py b/tests/test_lxml.py index 36f0340..c2b40c3 100644 --- a/tests/test_lxml.py +++ b/tests/test_lxml.py @@ -355,6 +355,12 @@ class TestLXMLBuilderInvalidMarkup(SoupTest): '
', '
') + def test_paragraphs_containing_block_display_elements(self): + markup = self.soup("

this is the definition:" + "

first case
") + # The

tag is closed before the

tag begins. + self.assertEquals(markup.p.contents, ["this is the definition:"]) + def test_empty_element_tag_with_contents(self): self.assertSoupEquals("
foo
", "
foo") -- cgit v1.2.3 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