aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Docx.hs15
-rw-r--r--tests/docx.metadata.docxbin0 -> 40487 bytes
-rw-r--r--tests/docx.metadata.native2
-rw-r--r--tests/docx.metadata_after_normal.docxbin0 -> 57273 bytes
-rw-r--r--tests/docx.metadata_after_normal.native7
-rw-r--r--tests/docx.metadata_author_linebreak.docxbin0 -> 40481 bytes
-rw-r--r--tests/docx.metadata_author_linebreak.native2
7 files changed, 26 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs
index 7b737f95a..8ad9e08ba 100644
--- a/tests/Tests/Readers/Docx.hs
+++ b/tests/Tests/Readers/Docx.hs
@@ -164,5 +164,20 @@ tests = [ testGroup "inlines"
"docx.track_changes_deletion.docx"
"docx.track_changes_deletion_all.native"
]
+ , testGroup "metadata"
+ [ testCompareWithOpts def{readerStandalone=True}
+ "metadata fields"
+ "docx.metadata.docx"
+ "docx.metadata.native"
+ , testCompareWithOpts def{readerStandalone=True}
+ "linebreak between authors"
+ "docx.metadata_author_linebreak.docx"
+ "docx.metadata_author_linebreak.native"
+ , testCompareWithOpts def{readerStandalone=True}
+ "stop recording metadata with normal text"
+ "docx.metadata_after_normal.docx"
+ "docx.metadata_after_normal.native"
+ ]
+
]
diff --git a/tests/docx.metadata.docx b/tests/docx.metadata.docx
new file mode 100644
index 000000000..34182a87e
--- /dev/null
+++ b/tests/docx.metadata.docx
Binary files differ
diff --git a/tests/docx.metadata.native b/tests/docx.metadata.native
new file mode 100644
index 000000000..ed7ba63cf
--- /dev/null
+++ b/tests/docx.metadata.native
@@ -0,0 +1,2 @@
+Pandoc (Meta {unMeta = fromList [("abstract",MetaInlines [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]),("author",MetaList [MetaInlines [Str "Mary",Space,Str "Ann",Space,Str "Evans"],MetaInlines [Str "Aurore",Space,Str "Dupin"]]),("date",MetaInlines [Str "July",Space,Str "28,",Space,Str "2014"]),("title",MetaInlines [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"])]})
+[Para [Str "And",Space,Str "now",Space,Str "this",Space,Str "is",Space,Str "normal",Space,Str "text."]]
diff --git a/tests/docx.metadata_after_normal.docx b/tests/docx.metadata_after_normal.docx
new file mode 100644
index 000000000..16b8d583c
--- /dev/null
+++ b/tests/docx.metadata_after_normal.docx
Binary files differ
diff --git a/tests/docx.metadata_after_normal.native b/tests/docx.metadata_after_normal.native
new file mode 100644
index 000000000..f0e31f8da
--- /dev/null
+++ b/tests/docx.metadata_after_normal.native
@@ -0,0 +1,7 @@
+Pandoc (Meta {unMeta = fromList [("abstract",MetaInlines [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]),("author",MetaList [MetaInlines [Str "Mary",Space,Str "Ann",Space,Str "Evans"],MetaInlines [Str "Aurore",Space,Str "Dupin"]]),("date",MetaInlines [Str "July",Space,Str "28,",Space,Str "2014"]),("title",MetaInlines [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"])]})
+[Para [Str "And",Space,Str "now",Space,Str "this",Space,Str "is",Space,Str "normal",Space,Str "text."]
+,Para [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"]
+,Para [Str "Mary",Space,Str "Ann",Space,Str "Evans"]
+,Para [Str "Aurore",Space,Str "Dupin"]
+,Para [Str "July",Space,Str "28,",Space,Str "2014"]
+,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]]
diff --git a/tests/docx.metadata_author_linebreak.docx b/tests/docx.metadata_author_linebreak.docx
new file mode 100644
index 000000000..94f0e0753
--- /dev/null
+++ b/tests/docx.metadata_author_linebreak.docx
Binary files differ
diff --git a/tests/docx.metadata_author_linebreak.native b/tests/docx.metadata_author_linebreak.native
new file mode 100644
index 000000000..ed7ba63cf
--- /dev/null
+++ b/tests/docx.metadata_author_linebreak.native
@@ -0,0 +1,2 @@
+Pandoc (Meta {unMeta = fromList [("abstract",MetaInlines [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]),("author",MetaList [MetaInlines [Str "Mary",Space,Str "Ann",Space,Str "Evans"],MetaInlines [Str "Aurore",Space,Str "Dupin"]]),("date",MetaInlines [Str "July",Space,Str "28,",Space,Str "2014"]),("title",MetaInlines [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"])]})
+[Para [Str "And",Space,Str "now",Space,Str "this",Space,Str "is",Space,Str "normal",Space,Str "text."]]