aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-20 11:46:39 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-20 11:46:39 +0000
commit56f4ecc7ebe8a19111daf54e505bc68b6c13c2e9 (patch)
treeac142b722f25795ed5d6f889a4029382b8a18763 /src/test
parentd5f51423cd58e17c81cb52b1471670d66a1de233 (diff)
Read content types from document
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/MammothTests.java7
-rw-r--r--src/test/resources/test-data/tiny-picture-custom-content-type.docxbin0 -> 10876 bytes
2 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/MammothTests.java b/src/test/java/org/zwobble/mammoth/tests/MammothTests.java
index 0a61661..46bafb2 100644
--- a/src/test/java/org/zwobble/mammoth/tests/MammothTests.java
+++ b/src/test/java/org/zwobble/mammoth/tests/MammothTests.java
@@ -47,6 +47,13 @@ public class MammothTests {
}
@Test
+ public void contentTypesAreRead() {
+ assertThat(
+ convertToHtml("tiny-picture-custom-content-type.docx"),
+ deepEquals(success("<p><img src=\"data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=\" /></p>")));
+ }
+
+ @Test
public void footnotesAreAppendedToText() {
assertThat(
convertToHtml("footnotes.docx", Mammoth.Options.DEFAULT.idPrefix("doc-42-")),
diff --git a/src/test/resources/test-data/tiny-picture-custom-content-type.docx b/src/test/resources/test-data/tiny-picture-custom-content-type.docx
new file mode 100644
index 0000000..3638f88
--- /dev/null
+++ b/src/test/resources/test-data/tiny-picture-custom-content-type.docx
Binary files differ