diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2019-09-21 11:39:15 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2019-09-21 11:39:15 -0700 |
| commit | 780079aaec6b82d3d235e20afda06cdfc8b486d5 (patch) | |
| tree | 6994f0b88d34cdc7df9baad28d2198e0819e2f29 /test | |
| parent | e3a6648e8f2553bb37a158729ec7cfbdd942fbcb (diff) | |
| parent | 9dbfd23c566efb5bf80deaf4e34b09cf38a97197 (diff) | |
| download | pandoc-780079aaec6b82d3d235e20afda06cdfc8b486d5.tar.gz | |
Merge branch 'lierdakil-docx-reader-styles'
Diffstat (limited to 'test')
| -rw-r--r-- | test/Tests/Readers/Docx.hs | 9 | ||||
| -rw-r--r-- | test/docx/0_level_headers.native | 4 | ||||
| -rw-r--r-- | test/docx/adjacent_codeblocks.docx | bin | 22437 -> 22264 bytes | |||
| -rw-r--r-- | test/docx/compact-style-removal.docx | bin | 0 -> 9951 bytes | |||
| -rw-r--r-- | test/docx/compact-style-removal.native | 5 | ||||
| -rw-r--r-- | test/docx/custom-style-with-styles.native | 6 | ||||
| -rw-r--r-- | test/docx/lists-compact.docx | bin | 0 -> 9952 bytes | |||
| -rw-r--r-- | test/docx/lists-compact.native | 5 | ||||
| -rw-r--r-- | test/docx/lists.docx | bin | 19845 -> 9473 bytes | |||
| -rw-r--r-- | test/docx/lists.native | 2 | ||||
| -rw-r--r-- | test/docx/nested_anchors_in_header.native | 2 |
11 files changed, 26 insertions, 7 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs index 9d0913e55..583a6ec18 100644 --- a/test/Tests/Readers/Docx.hs +++ b/test/Tests/Readers/Docx.hs @@ -256,6 +256,10 @@ tests = [ testGroup "document" "docx/lists.docx" "docx/lists.native" , testCompare + "compact lists" + "docx/lists-compact.docx" + "docx/lists-compact.native" + , testCompare "lists with level overrides" "docx/lists_level_override.docx" "docx/lists_level_override.native" @@ -425,6 +429,11 @@ tests = [ testGroup "document" "custom styles (`+styles`) enabled" "docx/custom-style-reference.docx" "docx/custom-style-with-styles.native" + , testCompareWithOpts + def{readerExtensions=extensionsFromList [Ext_styles]} + "custom styles (`+styles`): Compact style is removed from output" + "docx/compact-style-removal.docx" + "docx/compact-style-removal.native" ] , testGroup "metadata" [ testCompareWithOpts def{readerStandalone=True} diff --git a/test/docx/0_level_headers.native b/test/docx/0_level_headers.native index 804ad8732..6d8269b21 100644 --- a/test/docx/0_level_headers.native +++ b/test/docx/0_level_headers.native @@ -15,10 +15,10 @@ ,Para [Str "FIGURES",Space,Str "iv"] ,Para [Str "TABLES",Space,Str "v"] ,Para [Str "SECTION",Space,Str "1",Space,Str "Introduction",Space,Str "2"] -,Header 1 ("figures",["Heading0"],[]) [Str "FIGURES"] +,Header 1 ("figures",["Heading-0"],[]) [Str "FIGURES"] ,Para [Strong [Str "Figure",Space,Str "Page"]] ,Para [Strong [Str "No",Space,Str "table",Space,Str "of",Space,Str "figures",Space,Str "entries",Space,Str "found."]] -,Header 1 ("tables",["Heading0"],[]) [Str "TABLES"] +,Header 1 ("tables",["Heading-0"],[]) [Str "TABLES"] ,Para [Strong [Str "Table",Space,Str "Page"]] ,Para [Strong [Str "No",Space,Str "table",Space,Str "of",Space,Str "figures",Space,Str "entries",Space,Str "found."]] ,Header 1 ("introduction",[],[]) [Str "Introduction"] diff --git a/test/docx/adjacent_codeblocks.docx b/test/docx/adjacent_codeblocks.docx Binary files differindex d61fb45d5..0fd44a183 100644 --- a/test/docx/adjacent_codeblocks.docx +++ b/test/docx/adjacent_codeblocks.docx diff --git a/test/docx/compact-style-removal.docx b/test/docx/compact-style-removal.docx Binary files differnew file mode 100644 index 000000000..fde0064db --- /dev/null +++ b/test/docx/compact-style-removal.docx diff --git a/test/docx/compact-style-removal.native b/test/docx/compact-style-removal.native new file mode 100644 index 000000000..340878ba0 --- /dev/null +++ b/test/docx/compact-style-removal.native @@ -0,0 +1,5 @@ +[OrderedList (1,Decimal,Period) + [[Plain [Str "One"]] + ,[Plain [Str "Two"]] + ,[Plain [Str "Three"]] + ,[Plain [Str "Four"]]]] diff --git a/test/docx/custom-style-with-styles.native b/test/docx/custom-style-with-styles.native index 61f11911d..1ad7d88cc 100644 --- a/test/docx/custom-style-with-styles.native +++ b/test/docx/custom-style-with-styles.native @@ -1,7 +1,7 @@ -[Div ("",[],[("custom-style","FirstParagraph")]) +[Div ("",[],[("custom-style","First Paragraph")]) [Para [Str "This",Space,Str "is",Space,Str "some",Space,Str "text."]] -,Div ("",[],[("custom-style","BodyText")]) +,Div ("",[],[("custom-style","Body Text")]) [Para [Str "This",Space,Str "is",Space,Str "text",Space,Str "with",Space,Str "an",Space,Span ("",[],[("custom-style","Emphatic")]) [Str "emphasized"],Space,Str "text",Space,Str "style.",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "text",Space,Str "with",Space,Str "a",Space,Span ("",[],[("custom-style","Strengthened")]) [Str "strengthened"],Space,Str "text",Space,Str "style."]] -,Div ("",[],[("custom-style","MyBlockStyle")]) +,Div ("",[],[("custom-style","My Block Style")]) [BlockQuote [Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "styled",Space,Str "paragraph",Space,Str "that",Space,Str "inherits",Space,Str "from",Space,Str "Block",Space,Str "Text."]]]] diff --git a/test/docx/lists-compact.docx b/test/docx/lists-compact.docx Binary files differnew file mode 100644 index 000000000..d7f9e4a06 --- /dev/null +++ b/test/docx/lists-compact.docx diff --git a/test/docx/lists-compact.native b/test/docx/lists-compact.native new file mode 100644 index 000000000..340878ba0 --- /dev/null +++ b/test/docx/lists-compact.native @@ -0,0 +1,5 @@ +[OrderedList (1,Decimal,Period) + [[Plain [Str "One"]] + ,[Plain [Str "Two"]] + ,[Plain [Str "Three"]] + ,[Plain [Str "Four"]]]] diff --git a/test/docx/lists.docx b/test/docx/lists.docx Binary files differindex 8b46351d9..356dc1ea9 100644 --- a/test/docx/lists.docx +++ b/test/docx/lists.docx diff --git a/test/docx/lists.native b/test/docx/lists.native index af922b335..1192da709 100644 --- a/test/docx/lists.native +++ b/test/docx/lists.native @@ -15,4 +15,4 @@ ,Para [Str "Sub",Space,Str "paragraph"]]]]]] ,[Para [Str "Same",Space,Str "list"]]] ,BulletList - [[Para [Str "Different",Space,Str "list",Space,Str "adjacent",Space,Str "to",Space,Str "the",Space,Str "one",Space,Str "above."]]]] + [[Plain [Str "Different",Space,Str "list",Space,Str "adjacent",Space,Str "to",Space,Str "the",Space,Str "one",Space,Str "above."]]]] diff --git a/test/docx/nested_anchors_in_header.native b/test/docx/nested_anchors_in_header.native index 562f60215..314b31663 100644 --- a/test/docx/nested_anchors_in_header.native +++ b/test/docx/nested_anchors_in_header.native @@ -1,4 +1,4 @@ -[Header 1 ("\1086\1075\1083\1072\1074\1083\1077\1085\1080\1077",["TOCHeading"],[]) [Str "\1054\1075\1083\1072\1074\1083\1077\1085\1080\1077"] +[Header 1 ("\1086\1075\1083\1072\1074\1083\1077\1085\1080\1077",["TOC-Heading"],[]) [Str "\1054\1075\1083\1072\1074\1083\1077\1085\1080\1077"] ,Para [Link ("",[],[]) [Str "Short",Space,Str "instructions",Space,Str "1"] ("#short-instructions","")] ,Para [Link ("",[],[]) [Str "Some",Space,Str "instructions",Space,Str "1"] ("#some-instructions","")] ,Para [Link ("",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "opening",Space,Str "2"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")] |
