git.iko.soy/typeable/pandoc
on master help sign in
Docx writer: test for custom styles.
d416f62Jesse Rosenthal
tests/Tests/Writers/Docx.hs+8
@@ -137,5 +137,13 @@ tests = [ testGroup "inlines"
137 "stop recording metadata with normal text"
137 "stop recording metadata with normal text"
138 "docx/metadata_after_normal.native"
138 "docx/metadata_after_normal.native"
139 ]
139 ]
140+ , testGroup "customized styles"
141+ [ testCompareWithOpts
142+ ( def{writerReferenceDocx=Just "docx/custom-style-reference.docx"}
143+ , def)
144+ "simple customized blocks and inlines"
145+ "docx/custom-style-roundtrip-start.native"
146+ "docx/custom-style-roundtrip-end.native"
147+ ]
140
148
141 ]
149 ]
tests/docx/custom-style-reference.docxnew file

Binary file not shown.

tests/docx/custom-style-roundtrip-end.nativenew file+5
@@ -0,0 +1,5 @@
1+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "custom-styles."]
2+,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 "."]
3+,BlockQuote
4+ [Para [Str "One",Space,Str "paragraph",Space,Str "of",Space,Str "text."]
5+ ,Para [Str "And",Space,Str "another",Space,Str "paragraph",Space,Str "of",Space,Emph [Str "really",Space,Str "cool"],Space,Str "text."]]]
tests/docx/custom-style-roundtrip-start.nativenew file+5
@@ -0,0 +1,5 @@
1+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "custom-styles."]
2+,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 "."]
3+,Div ("",[],[("custom-style","My Block Style")])
4+ [Para [Str "One",Space,Str "paragraph",Space,Str "of",Space,Str "text."]
5+ ,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."]]]