aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-02-18 13:07:37 +0000
committerMichael Williamson <mike@zwobble.org>2024-02-18 13:07:37 +0000
commit3f91af0b67fd38577f3f167d19670193349cd30a (patch)
treeb34cc8dac765aa0a9fdf57f9d82b41be143ada21 /src/test
parentcb8360ca25dd74e3afa82fb5626df932f71013e8 (diff)
Add support for the strict document format
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/MammothTests.java8
-rw-r--r--src/test/resources/test-data/strict-format.docxbin0 -> 11692 bytes
2 files changed, 8 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 f491abd..85a20ce 100644
--- a/src/test/java/org/zwobble/mammoth/tests/MammothTests.java
+++ b/src/test/java/org/zwobble/mammoth/tests/MammothTests.java
@@ -310,6 +310,14 @@ public class MammothTests {
isSuccess("Apple\n\nBanana\n\n"));
}
+ @Test
+ public void canReadStrictFormat() throws IOException {
+ assertThat(
+ convertToHtml("strict-format.docx"),
+ isSuccess("<p>Test</p>")
+ );
+ }
+
private Result<String> convertToHtml(String name) throws IOException {
File file = TestData.file(name);
return new DocumentConverter().convertToHtml(file);
diff --git a/src/test/resources/test-data/strict-format.docx b/src/test/resources/test-data/strict-format.docx
new file mode 100644
index 0000000..4495720
--- /dev/null
+++ b/src/test/resources/test-data/strict-format.docx
Binary files differ