diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Writers/Powerpoint.hs | 8 | ||||
-rw-r--r-- | test/pptx/code-custom.pptx | bin | 0 -> 28230 bytes | |||
-rw-r--r-- | test/pptx/code-custom_templated.pptx | bin | 0 -> 395524 bytes | |||
-rw-r--r-- | test/pptx/code.native | 21 | ||||
-rw-r--r-- | test/pptx/code.pptx | bin | 0 -> 28229 bytes | |||
-rw-r--r-- | test/pptx/code_templated.pptx | bin | 0 -> 395522 bytes |
6 files changed, 29 insertions, 0 deletions
diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs index eb4b584e5..c21ee49a4 100644 --- a/test/Tests/Writers/Powerpoint.hs +++ b/test/Tests/Writers/Powerpoint.hs @@ -115,4 +115,12 @@ tests = groupPptxTests [ pptxTests "Inline formatting" def "pptx/document-properties-short-desc.native" "pptx/document-properties-short-desc.pptx" + , pptxTests "inline code and code blocks" + def + "pptx/code.native" + "pptx/code.pptx" + , pptxTests "inline code and code blocks, custom formatting" + def { writerVariables = [("monofont", "Consolas")] } + "pptx/code.native" + "pptx/code-custom.pptx" ] diff --git a/test/pptx/code-custom.pptx b/test/pptx/code-custom.pptx Binary files differnew file mode 100644 index 000000000..aa9b7692a --- /dev/null +++ b/test/pptx/code-custom.pptx diff --git a/test/pptx/code-custom_templated.pptx b/test/pptx/code-custom_templated.pptx Binary files differnew file mode 100644 index 000000000..9aaef4cb5 --- /dev/null +++ b/test/pptx/code-custom_templated.pptx diff --git a/test/pptx/code.native b/test/pptx/code.native new file mode 100644 index 000000000..be7f512f7 --- /dev/null +++ b/test/pptx/code.native @@ -0,0 +1,21 @@ +[Header 1 ("header-with-inline-code",[],[]) [Str "Header",Space,Str "with",Space,Code ("",[],[]) "inline code"] +,CodeBlock ("",[],[]) "Code at level 0" +,BulletList + [[Para [Str "Bullet",Space,Str "item",Space,Str "with",Space,Code ("",[],[]) "inline code"] + ,CodeBlock ("",[],[]) "Code block at level 1" + ,BulletList + [[Para [Str "with",Space,Code ("",[],[]) "nested"] + ,CodeBlock ("",[],[]) "lvl2\nlvl2\nlvl2" + ,Header 2 ("second-heading-level-with-code",[],[]) [Str "Second",Space,Str "heading",Space,Str "level",Space,Str "with",Space,Code ("",[],[]) "code"]]]]] +,Header 1 ("syntax-highlighting",[],[]) [Str "Syntax",Space,Str "highlighting"] +,CodeBlock ("",["haskell"],[]) "id :: a -> a\nid x = x" +,BulletList + [[Para [Str "Nested"] + ,CodeBlock ("",["haskell"],[]) "g :: Int -> Int\ng x = x * 3"]] +,Header 1 ("two-column-slide",[],[]) [Str "Two",Space,Str "column",Space,Str "slide"] +,Div ("",["columns"],[]) + [Div ("",["column"],[("width","50%")]) + [BulletList + [[Plain [Str "A",Space,Str "total",Space,Str "alternative",Space,Str "for",Space,Code ("",[],[]) "head"]]]] + ,Div ("",["column"],[("width","50%")]) + [CodeBlock ("",[],[]) "safeHead :: [a] -> Maybe a\nsafeHead [] = Nothing\nsafeHead (x:_) = Just x"]]] diff --git a/test/pptx/code.pptx b/test/pptx/code.pptx Binary files differnew file mode 100644 index 000000000..1737ec757 --- /dev/null +++ b/test/pptx/code.pptx diff --git a/test/pptx/code_templated.pptx b/test/pptx/code_templated.pptx Binary files differnew file mode 100644 index 000000000..87fb560ef --- /dev/null +++ b/test/pptx/code_templated.pptx |