aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mammoth_tests.py8
-rw-r--r--tests/test-data/utf8-bom.docxbin0 -> 2836 bytes
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py
index 9721d15..7ef8049 100644
--- a/tests/mammoth_tests.py
+++ b/tests/mammoth_tests.py
@@ -14,6 +14,14 @@ def docx_containing_one_paragraph_is_converted_to_single_p_element():
@istest
+def can_read_xml_files_with_utf8_bom():
+ with open(test_path("utf8-bom.docx"), "rb") as fileobj:
+ result = mammoth.convert_to_html(fileobj=fileobj)
+ assert_equal("<p>This XML has a byte order mark.</p>", result.value)
+ assert_equal([], result.messages)
+
+
+@istest
def inline_images_are_included_in_output():
with open(test_path("tiny-picture.docx"), "rb") as fileobj:
result = mammoth.convert_to_html(fileobj=fileobj)
diff --git a/tests/test-data/utf8-bom.docx b/tests/test-data/utf8-bom.docx
new file mode 100644
index 0000000..3881238
--- /dev/null
+++ b/tests/test-data/utf8-bom.docx
Binary files differ