git.iko.soy/typeable/pandoc
on master help sign in
Docx reader: Tests for alternate document.xml
commit1847bdbb833cfdd7abb34e7f906ab9a1f74dfa17 authorJesse Rosenthal <jrosenthal@jhu.edu> dateWed 6 Feb 2019, 21:11 (8 years ago) parent4cce0ef
3 files changed+9−2
test/Tests/Readers/Docx.hs+7−2 test/docx/alternate_document_path.docx test/docx/alternate_document_path.native+2
test/Tests/Readers/Docx.hs+7−2
@@ -126,7 +126,13 @@ testMediaBag :: String -> FilePath -> TestTree
126126testMediaBag name docxFile = unsafePerformIO $ testMediaBagIO name docxFile
127127
128128tests :: [TestTree]
129−tests = [ testGroup "inlines"
129+tests = [ testGroup "document"
130+ [ testCompare
131+ "allow different document.xml file as defined in _rels/.rels"
132+ "docx/alternate_document_path.docx"
133+ "docx/alternate_document_path.native"
134+ ]
135+ , testGroup "inlines"
130136 [ testCompare
131137 "font formatting"
132138 "docx/inline_formatting.docx"
@@ -422,5 +428,4 @@ tests = [ testGroup "inlines"
422428 "docx/metadata_after_normal.docx"
423429 "docx/metadata_after_normal.native"
424430 ]
425−
426431 ]
test/docx/alternate_document_path.docxnew file

Binary file not shown.

test/docx/alternate_document_path.nativenew file+2
@@ -0,0 +1,2 @@
1+[Header 1 ("test",[],[]) [Str "Test"]
2+,Para [Str "This",Space,Str "is",Space,Emph [Str "italic"],Str ",",Space,Strong [Str "bold"],Str ",",Space,Span ("",["underline"],[]) [Str "underlined"],Str ",",Space,Emph [Span ("",["underline"],[]) [Str "italic",Space,Str "underlined"]],Str ",",Space,Strong [Span ("",["underline"],[]) [Str "bold",Space,Str "underlined"]],Str ",",Space,Emph [Strong [Span ("",["underline"],[]) [Str "bold",Space,Str "italic",Space,Str "underlined"]]],Str "."]]