add a test for blank paragraphs

This commit is contained in:
Frédéric Péters 2013-12-16 09:47:25 +01:00
parent cd73c14e65
commit eea4bc937a
1 changed files with 22 additions and 0 deletions

View File

@ -631,6 +631,28 @@ class MiscTestCase(unittest.TestCase):
odf2legi.convert_to_legi_xml(doc),
'''<book><sect1><title>Chapter</title><para>Plop plop plop</para><para>Plop plop plop</para></sect1></book>''')
def test_blank_paragraphs(self):
doc = '''\
<office:document-content
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0">
<office:body>
<office:text>
<text:h text:style-name="Heading_20_3">Chapter</text:h>
<text:p>Plop plop plop</text:p>
<text:p> </text:p>
<text:p> </text:p>
<text:p>Plop plop plop</text:p>
</office:text>
</office:body>
</office:document-content>
'''
self.assertEqual(
odf2legi.convert_to_legi_xml(doc),
'''<book><sect1><title>Chapter</title><para>Plop plop plop</para><para>Plop plop plop</para></sect1></book>''')
def test_paragraph_with_annotation(self):
doc = '''\
<office:document-content