summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2014-06-21 17:58:32 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2014-06-22 00:46:19 -0400
commitca4add679ce6dd438cc3f6d58f82d04a9ad6305e (patch)
tree5956f394b50576255f63aeb2253bfde6521681ca /tests
parent9c7e0dc84b2384347099827999f0e2f7be4f7e51 (diff)
Add normalization test.
Add torture-test for new normalization functions. One problem that this test demonstrates is that word has a tendency to turn off formatting at a space, and then turn it back on after. I'm not sure yet whether this is something we should fix.
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Docx.hs4
-rw-r--r--tests/docx.normalize.docxbin0 -> 25994 bytes
-rw-r--r--tests/docx.normalize.native2
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs
index e8fa33241..74184efc6 100644
--- a/tests/Tests/Readers/Docx.hs
+++ b/tests/Tests/Readers/Docx.hs
@@ -74,6 +74,10 @@ tests = [ testGroup "inlines"
"literal tabs"
"docx.tabs.docx"
"docx.tabs.native"
+ , testCompare
+ "normalizing inlines"
+ "docx.normalize.docx"
+ "docx.normalize.native"
]
, testGroup "blocks"
[ testCompare
diff --git a/tests/docx.normalize.docx b/tests/docx.normalize.docx
new file mode 100644
index 000000000..5e4370a47
--- /dev/null
+++ b/tests/docx.normalize.docx
Binary files differ
diff --git a/tests/docx.normalize.native b/tests/docx.normalize.native
new file mode 100644
index 000000000..fa34d0581
--- /dev/null
+++ b/tests/docx.normalize.native
@@ -0,0 +1,2 @@
+[Para [Str "These",Space,Str "are",Space,Str "different",Space,Str "fonts."]
+,Para [Strong [Str "These",Space,Emph [Str "are"]],Space,Strong [Emph [Strikeout [Str "different"]],Space,Str "fonts."]]]