aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-08-15 15:33:06 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2016-08-15 15:33:06 -0400
commitd416f6241079a8d596fd071ed3dc20c4a60a6069 (patch)
tree3dfa4ffecc3c163db6882bd2a16a0777bada6e96 /tests/Tests
parent663f689fa40458d680d44624c108c3009b8329ca (diff)
downloadpandoc-d416f6241079a8d596fd071ed3dc20c4a60a6069.tar.gz
Docx writer: test for custom styles.
This just tests whether a custom style with a recognizable style (italic etc, defined in a reference.docx) will roundtrip back to that format (i.e., whether `<span custom-style="Emphasized">` will roundtrip to `Emph`). The custom styles are defined in the `custom-style-reference.docx` included in the docx dir.
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Writers/Docx.hs8
1 files changed, 8 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"
+ ]
]