aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2014-08-11 23:10:50 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2014-08-11 23:10:50 -0400
commit0808449547a2ec3469dbcc82c1755d895c1057e5 (patch)
tree3f7fe2775e3179ffcdb8830ac11e232a868b409d /tests
parent3e32cd5bb1ed4f5a5f408a7f676b323318bdb945 (diff)
downloadpandoc-0808449547a2ec3469dbcc82c1755d895c1057e5.tar.gz
Docx: Add dropcap tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Docx.hs10
-rw-r--r--tests/docx.drop_cap.docxbin0 -> 26931 bytes
-rw-r--r--tests/docx.drop_cap.native4
3 files changed, 10 insertions, 4 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs
index c310cc8d7..65fdd4a55 100644
--- a/tests/Tests/Readers/Docx.hs
+++ b/tests/Tests/Readers/Docx.hs
@@ -82,14 +82,14 @@ compareMediaBagIO docxFile = do
df <- B.readFile docxFile
let (_, mb) = readDocx def df
bools <- mapM
- (\(fp, _, _) -> compareMediaPathIO fp mb docxFile)
+ (\(fp, _, _) -> compareMediaPathIO fp mb docxFile)
(mediaDirectory mb)
return $ and bools
testMediaBagIO :: String -> FilePath -> IO Test
testMediaBagIO name docxFile = do
outcome <- compareMediaBagIO docxFile
- return $ testCase name (assertBool
+ return $ testCase name (assertBool
("Media didn't match media bag in file " ++ docxFile)
outcome)
@@ -176,7 +176,10 @@ tests = [ testGroup "inlines"
"code block"
"docx.codeblock.docx"
"docx.codeblock.native"
-
+ , testCompare
+ "dropcap paragraphs"
+ "docx.drop_cap.docx"
+ "docx.drop_cap.native"
]
, testGroup "track changes"
[ testCompare
@@ -229,4 +232,3 @@ tests = [ testGroup "inlines"
]
]
-
diff --git a/tests/docx.drop_cap.docx b/tests/docx.drop_cap.docx
new file mode 100644
index 000000000..19fab4a52
--- /dev/null
+++ b/tests/docx.drop_cap.docx
Binary files differ
diff --git a/tests/docx.drop_cap.native b/tests/docx.drop_cap.native
new file mode 100644
index 000000000..e6eb29de7
--- /dev/null
+++ b/tests/docx.drop_cap.native
@@ -0,0 +1,4 @@
+[Para [Str "D",Str "rop",Space,Str "cap."]
+,Para [Str "Next",Space,Str "paragraph."]
+,Para [Str "D",Str "rop",Space,Str "cap",Space,Str "in",Space,Str "margin."]
+,Para [Str "Drop",Space,Str "cap",Space,Str "(not",Space,Str "really)."]]