aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-06-21 23:14:03 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-06-21 23:14:03 -0700
commitcab16024fcba447f64b0254f54f3e0b4dd93bb99 (patch)
tree8318fa059ee7adb1103d0de5792a116b30b23502 /tests
parent08fe16e9720a3a191caf095d48e0a6c454039bf9 (diff)
parented43513087b514a5240fde04784dbf8709182513 (diff)
downloadpandoc-cab16024fcba447f64b0254f54f3e0b4dd93bb99.tar.gz
Merge pull request #1363 from jkr/newNormalize
Improve normalization
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Docx.hs8
-rw-r--r--tests/docx.deep_normalize.docxbin0 -> 29246 bytes
-rw-r--r--tests/docx.deep_normalize.native6
-rw-r--r--tests/docx.normalize.docxbin0 -> 25994 bytes
-rw-r--r--tests/docx.normalize.native2
5 files changed, 16 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs
index e8fa33241..ffb079eee 100644
--- a/tests/Tests/Readers/Docx.hs
+++ b/tests/Tests/Readers/Docx.hs
@@ -74,6 +74,14 @@ tests = [ testGroup "inlines"
"literal tabs"
"docx.tabs.docx"
"docx.tabs.native"
+ , testCompare
+ "normalizing inlines"
+ "docx.normalize.docx"
+ "docx.normalize.native"
+ , testCompare
+ "normalizing inlines deep inside blocks"
+ "docx.deep_normalize.docx"
+ "docx.deep_normalize.native"
]
, testGroup "blocks"
[ testCompare
diff --git a/tests/docx.deep_normalize.docx b/tests/docx.deep_normalize.docx
new file mode 100644
index 000000000..7626d59ce
--- /dev/null
+++ b/tests/docx.deep_normalize.docx
Binary files differ
diff --git a/tests/docx.deep_normalize.native b/tests/docx.deep_normalize.native
new file mode 100644
index 000000000..9b2089ec8
--- /dev/null
+++ b/tests/docx.deep_normalize.native
@@ -0,0 +1,6 @@
+[OrderedList (1,Decimal,OneParen)
+ [[Para [Str "This",Space,Str "is",Space,Str "at",Space,Str "the",Space,Str "first",Space,Str "level"]
+ ,OrderedList (1,LowerAlpha,DefaultDelim)
+ [[Para [Str "This",Space,Str "is",Space,Str "at",Space,Str "the",Space,Str "second",Space,Str "level"]
+ ,OrderedList (1,LowerRoman,DefaultDelim)
+ [[Para [Str "This",Space,Str "is",Space,Emph [Str "at",Space,Strong [Str "the",Space,Str "third",Space,Str "level"],Str ",",Space,Str "and",Space,Str "I",Space,Str "want",Space,Str "to"],Space,Str "test",Space,Str "normalization",Space,Str "here."]]]]]]]]
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..aeba672c4
--- /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,Strikeout [Str "different"]],Space,Str "fonts."]]]