summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-02-27 09:34:24 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-02-27 09:34:24 -0500
commitcdaa80e718ac177fb355819fc48c57f77d2a6bd1 (patch)
treec5e9f8300c91a1228e22f69dbc1c2c7c8d20983a
parentcdbe45e8ee1c5b87516ad020584576a22fdb28f4 (diff)
Powerpoint writer: add test for table and list syntax
These were never added when the tests were first created. Output files checked in MS PowerPoint 2013 (Windows 10, VBox). No corruption, and output as expected.
-rw-r--r--test/Tests/Writers/Powerpoint.hs9
-rw-r--r--test/pptx/lists.native18
-rw-r--r--test/pptx/lists.pptxbin0 -> 26765 bytes
-rw-r--r--test/pptx/lists_templated.pptxbin0 -> 394091 bytes
-rw-r--r--test/pptx/tables.native35
-rw-r--r--test/pptx/tables.pptxbin0 -> 27175 bytes
-rw-r--r--test/pptx/tables_templated.pptxbin0 -> 394504 bytes
7 files changed, 62 insertions, 0 deletions
diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs
index bca39c24f..9af8fc471 100644
--- a/test/Tests/Writers/Powerpoint.hs
+++ b/test/Tests/Writers/Powerpoint.hs
@@ -53,6 +53,14 @@ tests = groupPptxTests [ pptxTests "Inline formatting"
def{ writerSlideLevel = Just 1 }
"pptx/slide_breaks.native"
"pptx/slide_breaks_slide_level_1.pptx"
+ , pptxTests "lists"
+ def
+ "pptx/lists.native"
+ "pptx/lists.pptx"
+ , pptxTests "tables"
+ def
+ "pptx/tables.native"
+ "pptx/tables.pptx"
, pptxTests "table of contents"
def{ writerTableOfContents = True }
"pptx/slide_breaks.native"
@@ -81,4 +89,5 @@ tests = groupPptxTests [ pptxTests "Inline formatting"
def
"pptx/remove_empty_slides.native"
"pptx/remove_empty_slides.pptx"
+
]
diff --git a/test/pptx/lists.native b/test/pptx/lists.native
new file mode 100644
index 000000000..e08580cd5
--- /dev/null
+++ b/test/pptx/lists.native
@@ -0,0 +1,18 @@
+[Header 1 ("lists",[],[]) [Str "Lists"]
+,BulletList
+ [[Para [Str "Bulleted",Space,Str "bulleted",Space,Str "lists."]]
+ ,[Para [Str "And",Space,Str "go",Space,Str "to",Space,Str "aribtrary",Space,Str "depth."]
+ ,BulletList
+ [[Para [Str "Like",Space,Str "this"]
+ ,BulletList
+ [[Plain [Str "Or",Space,Str "this"]]]]
+ ,[Para [Str "Back",Space,Str "to",Space,Str "here."]]]]]
+,Header 1 ("lists-continued",[],[]) [Str "Lists",Space,Str "(continued)"]
+,Para [Str "Lists",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "numbered:"]
+,OrderedList (1,Decimal,Period)
+ [[Para [Str "Tomatoes"]]
+ ,[Para [Str "Potatoes",Space,Str "of",Space,Str "various",Space,Str "sorts"]
+ ,OrderedList (1,LowerAlpha,Period)
+ [[Para [Str "sweet",Space,Str "potatoes"]]
+ ,[Para [Str "russet",Space,Str "potates"]]]]
+ ,[Para [Str "Tornadoes,",Space,Str "for",Space,Str "the",Space,Str "rhyme."]]]]
diff --git a/test/pptx/lists.pptx b/test/pptx/lists.pptx
new file mode 100644
index 000000000..acb0841ce
--- /dev/null
+++ b/test/pptx/lists.pptx
Binary files differ
diff --git a/test/pptx/lists_templated.pptx b/test/pptx/lists_templated.pptx
new file mode 100644
index 000000000..14570c951
--- /dev/null
+++ b/test/pptx/lists_templated.pptx
Binary files differ
diff --git a/test/pptx/tables.native b/test/pptx/tables.native
new file mode 100644
index 000000000..e41b7bc8d
--- /dev/null
+++ b/test/pptx/tables.native
@@ -0,0 +1,35 @@
+[Header 2 ("a-table-with-a-caption",[],[]) [Str "A",Space,Str "Table,",Space,Str "with",Space,Str "a",Space,Str "caption"]
+,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax,",Space,Str "with",Space,Str "alignment"] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0]
+ [[Plain [Str "Right"]]
+ ,[Plain [Str "Left"]]
+ ,[Plain [Str "Center"]]
+ ,[Plain [Str "Default"]]]
+ [[[Plain [Str "12"]]
+ ,[Plain [Str "12"]]
+ ,[Plain [Str "12"]]
+ ,[Plain [Str "12"]]]
+ ,[[Plain [Str "123"]]
+ ,[Plain [Str "123"]]
+ ,[Plain [Str "123"]]
+ ,[Plain [Str "123"]]]
+ ,[[Plain [Str "1"]]
+ ,[Plain [Str "1"]]
+ ,[Plain [Str "1"]]
+ ,[Plain [Str "1"]]]]
+,Table [] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0]
+ [[Plain [Str "Right"]]
+ ,[Plain [Str "Left"]]
+ ,[Plain [Str "Center"]]
+ ,[Plain [Str "Default"]]]
+ [[[Plain [Str "12"]]
+ ,[Plain [Str "12"]]
+ ,[Plain [Str "12"]]
+ ,[Plain [Str "12"]]]
+ ,[[Plain [Str "123"]]
+ ,[Plain [Str "123"]]
+ ,[Plain [Str "123"]]
+ ,[Plain [Str "123"]]]
+ ,[[Plain [Str "1"]]
+ ,[Plain [Str "1"]]
+ ,[Plain [Str "1"]]
+ ,[Plain [Str "1"]]]]]
diff --git a/test/pptx/tables.pptx b/test/pptx/tables.pptx
new file mode 100644
index 000000000..0e8aea9ba
--- /dev/null
+++ b/test/pptx/tables.pptx
Binary files differ
diff --git a/test/pptx/tables_templated.pptx b/test/pptx/tables_templated.pptx
new file mode 100644
index 000000000..0ae560ad3
--- /dev/null
+++ b/test/pptx/tables_templated.pptx
Binary files differ