From 440533643e768b584194aaac59e26e35d53f6745 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Wed, 13 Dec 2017 15:14:23 -0500 Subject: Docx writer: Add tests for list continuation. --- test/Tests/Readers/Docx.hs | 8 ++++++++ test/docx/lists_continuing.docx | Bin 0 -> 17717 bytes test/docx/lists_continuing.native | 7 +++++++ test/docx/lists_restarting.docx | Bin 0 -> 18189 bytes test/docx/lists_restarting.native | 8 ++++++++ 5 files changed, 23 insertions(+) create mode 100644 test/docx/lists_continuing.docx create mode 100644 test/docx/lists_continuing.native create mode 100644 test/docx/lists_restarting.docx create mode 100644 test/docx/lists_restarting.native diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs index 421acaa8b..6d91c36ae 100644 --- a/test/Tests/Readers/Docx.hs +++ b/test/Tests/Readers/Docx.hs @@ -205,6 +205,14 @@ tests = [ testGroup "inlines" "lists" "docx/lists.docx" "docx/lists.native" + , testCompare + "lists continuing after interruption" + "docx/lists_continuing.docx" + "docx/lists_continuing.native" + , testCompare + "lists restarting after interruption" + "docx/lists_restarting.docx" + "docx/lists_restarting.native" , testCompare "definition lists" "docx/definition_list.docx" diff --git a/test/docx/lists_continuing.docx b/test/docx/lists_continuing.docx new file mode 100644 index 000000000..e6249260b Binary files /dev/null and b/test/docx/lists_continuing.docx differ diff --git a/test/docx/lists_continuing.native b/test/docx/lists_continuing.native new file mode 100644 index 000000000..24d352ce5 --- /dev/null +++ b/test/docx/lists_continuing.native @@ -0,0 +1,7 @@ +[OrderedList (1,Decimal,Period) + [[Para [Str "Foo"]] + ,[Para [Str "Bar"]] + ,[Para [Str "Baz"]]] +,Para [Str "Interruption."] +,OrderedList (4,Decimal,Period) + [[Para [Str "Bop"]]]] diff --git a/test/docx/lists_restarting.docx b/test/docx/lists_restarting.docx new file mode 100644 index 000000000..4acd67fcb Binary files /dev/null and b/test/docx/lists_restarting.docx differ diff --git a/test/docx/lists_restarting.native b/test/docx/lists_restarting.native new file mode 100644 index 000000000..6602f1262 --- /dev/null +++ b/test/docx/lists_restarting.native @@ -0,0 +1,8 @@ +[OrderedList (2,Decimal,Period) + [[Para [Str "Foo"]] + ,[Para [Str "Bar"]] + ,[Para [Str "Baz"]]] +,BlockQuote + [Para [Str "Interruption"]] +,OrderedList (1,Decimal,Period) + [[Para [Str "Bop."]]]] -- cgit v1.2.3