diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-29 11:15:34 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-29 11:15:34 -0700 |
commit | 8d4eebaff42cfe474042a7dafaa86950640b9e82 (patch) | |
tree | e1c58d8ac6442a3eb4cfa6015757226e860a48b9 /tests | |
parent | 4ddb8433a8326a872fd430d9aae7e2ba8ad7b051 (diff) | |
parent | 54708da371e767cd42598ea8f7fbd7d45c57421b (diff) | |
download | pandoc-8d4eebaff42cfe474042a7dafaa86950640b9e82.tar.gz |
Merge pull request #1463 from jkr/metadata
Make metadata out of styled pars
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Readers/Docx.hs | 11 | ||||
-rw-r--r-- | tests/docx.metadata.docx | bin | 0 -> 39538 bytes | |||
-rw-r--r-- | tests/docx.metadata.native | 2 | ||||
-rw-r--r-- | tests/docx.metadata_after_normal.docx | bin | 0 -> 56276 bytes | |||
-rw-r--r-- | tests/docx.metadata_after_normal.native | 7 |
5 files changed, 20 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs index 7b737f95a..b1a966969 100644 --- a/tests/Tests/Readers/Docx.hs +++ b/tests/Tests/Readers/Docx.hs @@ -164,5 +164,16 @@ 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} + "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 Binary files differnew file mode 100644 index 000000000..ccf50b475 --- /dev/null +++ b/tests/docx.metadata.docx 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 Binary files differnew file mode 100644 index 000000000..b94a016cb --- /dev/null +++ b/tests/docx.metadata_after_normal.docx 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."]] |