aboutsummaryrefslogtreecommitdiff
path: root/tests/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-08-30 10:54:02 +0100
committerMichael Williamson <mike@zwobble.org>2014-08-30 10:54:45 +0100
commit32d35f2fcdd85f65ea38eb16b772de503f8d4107 (patch)
tree9818c4727b277e52e64641867205930bf0df4b1e /tests/docx
parent7d5045309a7100dfd2404f0bcdf73d27f4883ab1 (diff)
Ignore separators in footnotes XML
Diffstat (limited to 'tests/docx')
-rw-r--r--tests/docx/footnotes_xml_tests.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/docx/footnotes_xml_tests.py b/tests/docx/footnotes_xml_tests.py
index 56caff0..c3fed04 100644
--- a/tests/docx/footnotes_xml_tests.py
+++ b/tests/docx/footnotes_xml_tests.py
@@ -14,3 +14,21 @@ def id_and_body_of_footnote_are_read():
assert_is(footnote_body, footnotes[0].body)
assert_equal("1", footnotes[0].id)
+
+@istest
+def continuation_separator_is_ignored():
+ _assert_footnote_type_is_ignored("continuationSeparator")
+
+
+@istest
+def separator_is_ignored():
+ _assert_footnote_type_is_ignored("separator")
+
+
+def _assert_footnote_type_is_ignored(footnote_type):
+ footnote_body = [xml_element("w:p")]
+ footnotes = read_footnotes_xml_element(xml_element("w:footnotes", {}, [
+ xml_element("w:footnote", {"w:id": "1", "w:type": footnote_type}, footnote_body),
+ ]))
+ assert_equal(0, len(footnotes))
+