From 70c3eccb4efe500b33c8d5f41308b93cb1bd453b Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Mon, 16 Dec 2019 12:01:40 +0000 Subject: [PATCH] glifLib_test: test xml containing --- Tests/ufoLib/glifLib_test.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Tests/ufoLib/glifLib_test.py b/Tests/ufoLib/glifLib_test.py index 06aca9729..a29c76bf4 100644 --- a/Tests/ufoLib/glifLib_test.py +++ b/Tests/ufoLib/glifLib_test.py @@ -161,3 +161,21 @@ class ReadWriteFuncTest(unittest.TestCase): def testXmlDeclaration(self): s = writeGlyphToString("a", _Glyph()) self.assertTrue(s.startswith(XML_DECLARATION % "UTF-8")) + + +def test_parse_xml_remove_comments(): + s = b""" + + + + + + + """ + + g = _Glyph() + readGlyphFromString(s, g) + + assert g.name == "A" + assert g.width == 1290 + assert g.unicodes == [0x0041]