Commit 7f818d99 authored by Nicolas Delaby's avatar Nicolas Delaby

OOo after refresh can decide to cleanup text:span elements

Take into account this behaviour.

Before refresh:
  <text:reference-mark-start text:name="week"/>
      <text:span>Monday</text:span>
    <text:reference-mark-end text:name="week"/
After refresh:
  <text:reference-mark-start text:name="week"/>Monday<text:reference-mark-end text:name="week"/>


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41625 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bfc71482
......@@ -259,10 +259,16 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
content_tree = etree.XML(content_xml)
span_list = content_tree.xpath('//text:reference-mark-start[@text:name="week"]/following-sibling::text:span',
namespaces=content_tree.nsmap)
self.assertEquals(1, len(span_list))
span = span_list[0]
self.assertEquals('line1', span.text)
self.assertEquals('line2', span[0].tail)
if span_list:
self.assertEquals(1, len(span_list))
span = span_list[0]
self.assertEquals('line1', span.text)
self.assertEquals('line2', span[0].tail)
else:
reference_mark_node = content_tree.xpath('//text:reference-mark-start[@text:name="week"][1]',
namespaces=content_tree.nsmap)[0]
self.assertEquals('line1', reference_mark_node.tail)
self.assertEquals('line2', reference_mark_node.getnext().tail)
self._validate(odf_document)
def test_01_Paragraph_08_Field_Format(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment