From ca4add679ce6dd438cc3f6d58f82d04a9ad6305e Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Sat, 21 Jun 2014 17:58:32 -0400 Subject: 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. --- tests/Tests/Readers/Docx.hs | 4 ++++ tests/docx.normalize.docx | Bin 0 -> 25994 bytes tests/docx.normalize.native | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 tests/docx.normalize.docx create mode 100644 tests/docx.normalize.native (limited to 'tests') 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 Binary files /dev/null and b/tests/docx.normalize.docx 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."]]] -- cgit v1.2.3