Docx reader: Tests for alternate document.xml

This commit is contained in:
Jesse Rosenthal 2019-02-06 21:11:51 -05:00
parent 4cce0efa48
commit 1847bdbb83
3 changed files with 9 additions and 2 deletions

View file

@ -126,7 +126,13 @@ testMediaBag :: String -> FilePath -> TestTree
testMediaBag name docxFile = unsafePerformIO $ testMediaBagIO name docxFile
tests :: [TestTree]
tests = [ testGroup "inlines"
tests = [ testGroup "document"
[ testCompare
"allow different document.xml file as defined in _rels/.rels"
"docx/alternate_document_path.docx"
"docx/alternate_document_path.native"
]
, testGroup "inlines"
[ testCompare
"font formatting"
"docx/inline_formatting.docx"
@ -422,5 +428,4 @@ tests = [ testGroup "inlines"
"docx/metadata_after_normal.docx"
"docx/metadata_after_normal.native"
]
]

Binary file not shown.

View file

@ -0,0 +1,2 @@
[Header 1 ("test",[],[]) [Str "Test"]
,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 "."]]