git.iko.soy/typeable/pandoc
on master help sign in
Docx: Add dropcap tests.
commit0808449547a2ec3469dbcc82c1755d895c1057e5 authorJesse Rosenthal <jrosenthal@jhu.edu> dateMon 11 Aug 2014, 23:10 (12 years ago) parent3e32cd5
4 files changed+11−4
pandoc.cabal+1 tests/Tests/Readers/Docx.hs+6−4 tests/docx.drop_cap.docx tests/docx.drop_cap.native+4
pandoc.cabal+1
@@ -177,6 +177,7 @@ Extra-Source-Files:
177177 tests/docx.codeblock.docx,
178178 tests/docx.deep_normalize.docx,
179179 tests/docx.definition_list.docx,
180+ tests/docx.drop_cap.docx,
180181 tests/docx.hanging_indent.docx,
181182 tests/docx.headers.docx,
182183 tests/docx.image.docx,
tests/Tests/Readers/Docx.hs+6−4
@@ -82,14 +82,14 @@ compareMediaBagIO docxFile = do
8282 df <- B.readFile docxFile
8383 let (_, mb) = readDocx def df
8484 bools <- mapM
85− (\(fp, _, _) -> compareMediaPathIO fp mb docxFile)
85+ (\(fp, _, _) -> compareMediaPathIO fp mb docxFile)
8686 (mediaDirectory mb)
8787 return $ and bools
8888
8989testMediaBagIO :: String -> FilePath -> IO Test
9090testMediaBagIO name docxFile = do
9191 outcome <- compareMediaBagIO docxFile
92− return $ testCase name (assertBool
92+ return $ testCase name (assertBool
9393 ("Media didn't match media bag in file " ++ docxFile)
9494 outcome)
9595
@@ -176,7 +176,10 @@ tests = [ testGroup "inlines"
176176 "code block"
177177 "docx.codeblock.docx"
178178 "docx.codeblock.native"
179−
179+ , testCompare
180+ "dropcap paragraphs"
181+ "docx.drop_cap.docx"
182+ "docx.drop_cap.native"
180183 ]
181184 , testGroup "track changes"
182185 [ testCompare
@@ -229,4 +232,3 @@ tests = [ testGroup "inlines"
229232 ]
230233
231234 ]
232−
tests/docx.drop_cap.docxnew file

Binary file not shown.

tests/docx.drop_cap.nativenew file+4
@@ -0,0 +1,4 @@
1+[Para [Str "D",Str "rop",Space,Str "cap."]
2+,Para [Str "Next",Space,Str "paragraph."]
3+,Para [Str "D",Str "rop",Space,Str "cap",Space,Str "in",Space,Str "margin."]
4+,Para [Str "Drop",Space,Str "cap",Space,Str "(not",Space,Str "really)."]]