Commit 68726ed4 authored by Nicolas Delaby's avatar Nicolas Delaby

Remove extra spaces only

parent 6aa55931
......@@ -20,33 +20,33 @@ ERP5Diff Usage and its output example
1. update the texts of the three elements
>>> from ERP5Diff import ERP5Diff
>>> from ERP5Diff import ERP5Diff
>>> erp5diff = ERP5Diff()
>>> old_xml = """
... <erp5>
... <object portal_type="Person" id="313730">
... <erp5>
... <object portal_type="Person" id="313730">
... <description type="text">description1 --- $sdfr&#231;_sdfs&#231;df_oisfsopf</description>
... <first_name type="string">Kamada</first_name>
... <last_name type="string">Kamada</last_name>
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:24.700 GMT+9</time>
... </workflow_action>
... </object>
... </erp5>
... """
>>> new_xml = """
... <erp5>
... <object portal_type="Person" id="313730">
... <description type="text">description3 &#231;sdf__sdf&#231;&#231;&#231;_df___&amp;amp;&amp;amp;&#233;]]]&#176;&#176;&#176;&#176;&#176;&#176;</description>
... <first_name type="string">Tatuya</first_name>
... <last_name type="string">Kamada</last_name>
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:24.703 GMT+9</time>
... </workflow_action>
... </object>
... </erp5>
... """
... <first_name type="string">Kamada</first_name>
... <last_name type="string">Kamada</last_name>
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:24.700 GMT+9</time>
... </workflow_action>
... </object>
... </erp5>
... """
>>> new_xml = """
... <erp5>
... <object portal_type="Person" id="313730">
... <description type="text">description3 &#231;sdf__sdf&#231;&#231;&#231;_df___&amp;amp;&amp;amp;&#233;]]]&#176;&#176;&#176;&#176;&#176;&#176;</description>
... <first_name type="string">Tatuya</first_name>
... <last_name type="string">Kamada</last_name>
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:24.703 GMT+9</time>
... </workflow_action>
... </object>
... </erp5>
... """
>>> erp5diff.compare(old_xml, new_xml)
>>> erp5diff.output()
......@@ -81,7 +81,7 @@ ERP5Diff Usage and its output example
3. same
>>> old_xml = """
... <erp5>
... <erp5>
... <object portal_type="Person" id="313730">
... <title type="string">Tatuya Kamada</title>
... <subject_list type="lines">&lt;?xml version="1.0"?&gt;&lt;marshal&gt;&lt;list id="i2"&gt;&lt;/list&gt;&lt;/marshal&gt;</subject_list>
......@@ -114,8 +114,8 @@ ERP5Diff Usage and its output example
4. update the texts of the elements and remove an element
>>> old_xml = """
... <erp5>
>>> old_xml = """
... <erp5>
... <object portal_type="Person" id="313730">
... <description type="text">description2&#233;&#224;@ $*&amp;lt; &amp;lt;&amp;lt;&amp;lt; -----</description>
... <language type="string">en</language>
......@@ -148,7 +148,7 @@ ERP5Diff Usage and its output example
<xupdate:remove select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][2]"/>
</xupdate:modifications>
5. update two elements includes some symbols
5. update two elements includes some symbols
>>> old_xml = """
... <erp5>
......@@ -175,11 +175,11 @@ ERP5Diff Usage and its output example
6. update two date element which have same id
>>> old_xml = """
... <erp5>
... <object portal_type="Person" id="313730">
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:40.550 GMT+9</time>
>>> old_xml = """
... <erp5>
... <object portal_type="Person" id="313730">
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:40.550 GMT+9</time>
... </workflow_action>
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:40.903 GMT+9</time>
......@@ -241,7 +241,7 @@ ERP5Diff Usage and its output example
<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
<xupdate:remove select="/erp5/object[@id='313731']/local_role[@id='tk']"/>
<xupdate:append select="/erp5/object[@id='313731']" child="first()">
<xupdate:element name="local_role"><xupdate:attribute name="type">tokens</xupdate:attribute><xupdate:attribute name="id">tatuya</xupdate:attribute>&lt;?xml version="1.0"?&gt;&lt;marshal&gt;&lt;tuple&gt;&lt;string&gt;Owner&lt;/string&gt;&lt;/tuple&gt;&lt;/marshal&gt;</xupdate:element>
<xupdate:element name="local_role"><xupdate:attribute name="type">tokens</xupdate:attribute><xupdate:attribute name="id">tatuya</xupdate:attribute>&lt;?xml version="1.0"?&gt;&lt;marshal&gt;&lt;tuple&gt;&lt;string&gt;Owner&lt;/string&gt;&lt;/tuple&gt;&lt;/marshal&gt;</xupdate:element>
<xupdate:element name="JohnDoe">Go to the beach</xupdate:element>
</xupdate:append>
<xupdate:insert-before select="/erp5/object[@id='313731']/local_permission[@id='View']">
......@@ -303,7 +303,7 @@ ERP5Diff Usage and its output example
10. rename root element
>>> old_xml = """
... <erp5>
... <erp5>
... <object portal_type="Person" id="313730">
... <id type="string">313730</id>
... <title type="string">Tatuya Kamada</title>
......@@ -347,7 +347,7 @@ ERP5Diff Usage and its output example
<xupdate:update select="/erp5/object[@id='313730']/local_role[@id='fab']/attribute::type">ccc</xupdate:update>
</xupdate:modifications>
12. Update two attribute
12. Update two attribute
>>> old_xml = """
... <erp5>
......@@ -543,11 +543,11 @@ ERP5Diff Usage and its output example
20. Remove some elements that have same id
This is an unexpected case for current ERP5Diff alogrithm. So current ERP5Diff
This is an unexpected case for current ERP5Diff alogrithm. So current ERP5Diff
does not work as bellow example. This is a known bug.
>>> old_xml = """
... <erp5>
>>> old_xml = """
... <erp5>
... <object portal_type="Person" id="313730">
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:34.424 GMT+9</time>
......@@ -603,8 +603,8 @@ does not work as bellow example. This is a known bug.
As well as No.20. This a known bug, too.
>>> old_xml = """
... <erp5>
>>> old_xml = """
... <erp5>
... <object portal_type="Person" id="313730">
... <workflow_action id="edit_workflow">
... <time type="date">2009/08/28 19:12:34.424 GMT+9</time>
......@@ -643,14 +643,14 @@ does not work as bellow example. This is a known bug.
>>> erp5diff.output()
<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
<xupdate:update select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][2]/time">2009/08/29 19:12:34.432 GMT+9</xupdate:update>
<xupdate:update select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][3]/time">2009/08/30 19:12:34.434 GMT+9</xupdate:update>
<xupdate:update select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][4]/time">2009/08/31 19:12:34.436 GMT+9</xupdate:update>
<xupdate:update select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][3]/time">2009/08/30 19:12:34.434 GMT+9</xupdate:update>
<xupdate:update select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][4]/time">2009/08/31 19:12:34.436 GMT+9</xupdate:update>
</xupdate:modifications>
22. Modify attributes of sequencial objects
ERP5Diff creates target index from 0 as a XPath string, but according to the
definition of the XPath specification <http://www.w3.org/TR/xpath>, it is wrong.
ERP5Diff creates target index from 0 as a XPath string, but according to the
definition of the XPath specification <http://www.w3.org/TR/xpath>, it is wrong.
It should be start from 1. This is a known problem.
>>> old_xml = """
......
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