diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-10 16:41:10 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-10 16:41:10 -0500 |
commit | d89c8878ea86a2575c87e9fad8081cfcd81e0bcd (patch) | |
tree | cdad3f97812e658d84a611b6017b7198fd97d818 /tests/test_html5lib.py | |
parent | e1ad4220e5ca00ec0e7f77ce5087845fcb356a0e (diff) |
Added some elementary doctype handling.
Diffstat (limited to 'tests/test_html5lib.py')
-rw-r--r-- | tests/test_html5lib.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_html5lib.py b/tests/test_html5lib.py index 3e35949..dada900 100644 --- a/tests/test_html5lib.py +++ b/tests/test_html5lib.py @@ -43,6 +43,8 @@ class TestHTML5Builder(TestLXMLBuilder): self.assertSoupEquals("<p> </p>") self.assertSoupEquals("<b> </b>") + def test_cdata(self): + print self.soup("<div><![CDATA[foo]]></div>") class TestHTML5BuilderInvalidMarkup(TestLXMLBuilderInvalidMarkup): """See `BuilderInvalidMarkupSmokeTest`.""" @@ -70,6 +72,10 @@ class TestHTML5BuilderInvalidMarkup(TestLXMLBuilderInvalidMarkup): ('<table><tbody><tr></tr></tbody></table>' '<table><tbody><tr id="nested"></tr></tbody></table>')) + def test_doctype_in_body(self): + markup = "<p>one<!DOCTYPE foobar>two</p>" + self.assertSoupEquals(markup, "<p>onetwo</p>") + def test_foo(self): isolatin = """<html><meta http-equiv="Content-type" content="text/html; charset=ISO-Latin-1" />Sacr\xe9 bleu!</html>""" soup = self.soup(isolatin) |