Exemplo n.º 1
0
 def test_append_plain_text_guess_iso(self):
     txt = "A test,\n   \twith \n\n some \xe9 and \t and     5 spaces."
     para = Paragraph()
     para.append_plain_text(txt)
     expected = ('<text:p>A test,<text:line-break/> <text:s text:c="2"/>'
                 "<text:tab/>with <text:line-break/><text:line-break/> "
                 'some é and <text:tab/> and <text:s text:c="4"/>'
                 "5 spaces.</text:p>")
     self.assertEqual(para.serialize(), expected)
Exemplo n.º 2
0
 def test_append_plain_text_guess_utf8(self):
     txt = 'A test,\n   \twith \n\n some é and \t and     5 spaces.'
     para = Paragraph()
     para.append_plain_text(txt)
     expected = ('<text:p>A test,<text:line-break/> <text:s text:c="2"/>'
                 '<text:tab/>with <text:line-break/><text:line-break/> '
                 'some é and <text:tab/> and <text:s text:c="4"/>'
                 '5 spaces.</text:p>')
     self.assertEqual(para.serialize(), expected)