From a82dedf1ff1b6fe345640843dad653386a8f9bc7 Mon Sep 17 00:00:00 2001
From: Nikolay Yakimov <root@livid.pp.ru>
Date: Sun, 8 Mar 2015 03:59:48 +0300
Subject: [PATCH] Lists test

---
 tests/Tests/Writers/Docx.hs    |  8 ++++----
 tests/docx/lists_writer.native | 17 +++++++++++++++++
 2 files changed, 21 insertions(+), 4 deletions(-)
 create mode 100644 tests/docx/lists_writer.native

diff --git a/tests/Tests/Writers/Docx.hs b/tests/Tests/Writers/Docx.hs
index 4a199755d..a22daadb8 100644
--- a/tests/Tests/Writers/Docx.hs
+++ b/tests/Tests/Writers/Docx.hs
@@ -83,10 +83,10 @@ tests = [ testGroup "inlines"
           , testCompare
             "i18n blocks (headers and blockquotes)"
             "docx/i18n_blocks.native"
-          -- some level problems, look into that
-          -- , testCompare
-          --   "lists"
-          --   "docx/lists.native"
+          -- Continuation does not survive round-trip
+          , testCompare
+            "lists"
+            "docx/lists_writer.native"
           , testCompare
             "definition lists"
             "docx/definition_list.native"
diff --git a/tests/docx/lists_writer.native b/tests/docx/lists_writer.native
new file mode 100644
index 000000000..4c44ea603
--- /dev/null
+++ b/tests/docx/lists_writer.native
@@ -0,0 +1,17 @@
+[Header 2 ("some-nested-lists",[],[]) [Str "Some",Space,Str "nested",Space,Str "lists"]
+,OrderedList (1,Decimal,Period)
+ [[Para [Str "one"]]
+ ,[Para [Str "two"]
+  ,OrderedList (1,LowerAlpha,DefaultDelim)
+   [[Para [Str "a"]]
+   ,[Para [Str "b"]]]]]
+,BulletList
+ [[Para [Str "one"]]
+ ,[Para [Str "two"]
+  ,BulletList
+   [[Para [Str "three"]
+    ,BulletList
+     [[Para [Str "four"]]]]]]
+ ,[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."]]]]