diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Writers/Docx.hs | 8 | ||||
-rw-r--r-- | tests/docx/custom-style-reference.docx | bin | 0 -> 14846 bytes | |||
-rw-r--r-- | tests/docx/custom-style-roundtrip-end.native | 5 | ||||
-rw-r--r-- | tests/docx/custom-style-roundtrip-start.native | 5 |
4 files changed, 18 insertions, 0 deletions
diff --git a/tests/Tests/Writers/Docx.hs b/tests/Tests/Writers/Docx.hs index d662697a1..8e0f37818 100644 --- a/tests/Tests/Writers/Docx.hs +++ b/tests/Tests/Writers/Docx.hs @@ -137,5 +137,13 @@ tests = [ testGroup "inlines" "stop recording metadata with normal text" "docx/metadata_after_normal.native" ] + , testGroup "customized styles" + [ testCompareWithOpts + ( def{writerReferenceDocx=Just "docx/custom-style-reference.docx"} + , def) + "simple customized blocks and inlines" + "docx/custom-style-roundtrip-start.native" + "docx/custom-style-roundtrip-end.native" + ] ] diff --git a/tests/docx/custom-style-reference.docx b/tests/docx/custom-style-reference.docx Binary files differnew file mode 100644 index 000000000..0f53c6c88 --- /dev/null +++ b/tests/docx/custom-style-reference.docx diff --git a/tests/docx/custom-style-roundtrip-end.native b/tests/docx/custom-style-roundtrip-end.native new file mode 100644 index 000000000..4313c3595 --- /dev/null +++ b/tests/docx/custom-style-roundtrip-end.native @@ -0,0 +1,5 @@ +[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "custom-styles."] +,Para [Str "Here",Space,Str "is",Space,Str "something",Space,Emph [Str "emphasized"],Str ".",Space,Str "And",Space,Str "here",Space,Str "is",Space,Str "something",Space,Strong [Str "strong"],Str "."] +,BlockQuote + [Para [Str "One",Space,Str "paragraph",Space,Str "of",Space,Str "text."] + ,Para [Str "And",Space,Str "another",Space,Str "paragraph",Space,Str "of",Space,Emph [Str "really",Space,Str "cool"],Space,Str "text."]]] diff --git a/tests/docx/custom-style-roundtrip-start.native b/tests/docx/custom-style-roundtrip-start.native new file mode 100644 index 000000000..c4566ed85 --- /dev/null +++ b/tests/docx/custom-style-roundtrip-start.native @@ -0,0 +1,5 @@ +[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "custom-styles."] +,Para [Str "Here",Space,Str "is",Space,Str "something",Space,Span ("",[],[("custom-style","Emphatic")]) [Str "emphasized"],Str ".",Space,Str "And",SoftBreak,Str "here",Space,Str "is",Space,Str "something",Space,Span ("",[],[("custom-style","Strengthened")]) [Str "strong"],Str "."] +,Div ("",[],[("custom-style","My Block Style")]) + [Para [Str "One",Space,Str "paragraph",Space,Str "of",Space,Str "text."] + ,Para [Str "And",Space,Str "another",Space,Str "paragraph",Space,Str "of",Space,Span ("",[],[("custom-style","Emphatic")]) [Str "really",SoftBreak,Str "cool"],Space,Str "text."]]] |