aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2019-02-06 21:11:51 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2019-02-06 21:14:46 -0500
commit1847bdbb833cfdd7abb34e7f906ab9a1f74dfa17 (patch)
tree567e8dbc30cfac51132fdb7eee17acc3aee5964b /test
parent4cce0efa4824b4081a2d971c488c5026c314bbb5 (diff)
downloadpandoc-1847bdbb833cfdd7abb34e7f906ab9a1f74dfa17.tar.gz
Docx reader: Tests for alternate document.xml
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Docx.hs9
-rw-r--r--test/docx/alternate_document_path.docxbin0 -> 11582 bytes
-rw-r--r--test/docx/alternate_document_path.native2
3 files changed, 9 insertions, 2 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 34cc4bb53..48b9a27d0 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -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"
]
-
]
diff --git a/test/docx/alternate_document_path.docx b/test/docx/alternate_document_path.docx
new file mode 100644
index 000000000..94d34b011
--- /dev/null
+++ b/test/docx/alternate_document_path.docx
Binary files differ
diff --git a/test/docx/alternate_document_path.native b/test/docx/alternate_document_path.native
new file mode 100644
index 000000000..5e34fa4bc
--- /dev/null
+++ b/test/docx/alternate_document_path.native
@@ -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 "."]]