diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-26 09:22:42 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-26 09:22:42 -0500 |
commit | f224b8536ce266538bcfa492ec8d2b3b41fceae5 (patch) | |
tree | 30d431989c7a5b18da139c8a03d433d5ce2b119d /bs4/testing.py | |
parent | 105aa2f9a9f833ff98c1706290b07e9228e008a6 (diff) |
Fixed DOCTYPE handling.
Diffstat (limited to 'bs4/testing.py')
-rw-r--r-- | bs4/testing.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py index 13a7b5a..49644c3 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -79,6 +79,13 @@ class HTMLTreeBuilderSmokeTest(object): self.assertDoctypeHandled( 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"') + def test_public_doctype_with_url(self): + doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"' + self.assertDoctypeHandled(doctype) + + def test_system_doctype(self): + self.assertDoctypeHandled('foo SYSTEM "http://www.example.com/"') + def test_namespaced_system_doctype(self): # We can handle a namespaced doctype with a system ID. self.assertDoctypeHandled('xsl:stylesheet SYSTEM "htmlent.dtd"') |