diff options
Diffstat (limited to 'bs4/testing.py')
-rw-r--r-- | bs4/testing.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py index 9e5e295..847c9fc 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -556,6 +556,11 @@ class XMLTreeBuilderSmokeTest(object): self.assertEqual( soup.encode(), b'<?xml version="1.0" encoding="utf-8"?>\n<root/>') + def test_xml_declaration(self): + markup = b"""<?xml version="1.0" encoding="utf8"?>\n<foo/>""" + soup = self.soup(markup) + self.assertEqual(markup, soup.encode("utf8")) + def test_real_xhtml_document(self): """A real XHTML document should come out *exactly* the same as it went in.""" markup = b"""<?xml version="1.0" encoding="utf-8"?> |