From d5b98c8c6ec13556911876ac5632efb63a1ce40d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 14 Apr 2018 10:38:21 -0700 Subject: Man writer: Don't escape U+2019 as '. Closes #4550. --- test/Tests/Writers/Powerpoint.hs.orig | 93 +++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 test/Tests/Writers/Powerpoint.hs.orig (limited to 'test/Tests/Writers/Powerpoint.hs.orig') diff --git a/test/Tests/Writers/Powerpoint.hs.orig b/test/Tests/Writers/Powerpoint.hs.orig new file mode 100644 index 000000000..9af8fc471 --- /dev/null +++ b/test/Tests/Writers/Powerpoint.hs.orig @@ -0,0 +1,93 @@ +module Tests.Writers.Powerpoint (tests) where + +import Tests.Writers.OOXML (ooxmlTest) +import Text.Pandoc +import Test.Tasty +import System.FilePath + +-- templating is important enough, and can break enough things, that +-- we want to run all our tests with both default formatting and a +-- template. + +modifyPptxName :: FilePath -> FilePath +modifyPptxName fp = + addExtension (dropExtension fp ++ "_templated") "pptx" + +pptxTests :: String -> WriterOptions -> FilePath -> FilePath -> (TestTree, TestTree) +pptxTests name opts native pptx = + let referenceDoc = "pptx/reference_depth.pptx" + in + ( ooxmlTest + writePowerpoint + name + opts{writerReferenceDoc=Nothing} + native + pptx + , ooxmlTest + writePowerpoint + name + opts{writerReferenceDoc=Just referenceDoc} + native + (modifyPptxName pptx) + ) + +groupPptxTests :: [(TestTree, TestTree)] -> [TestTree] +groupPptxTests pairs = + let (noRefs, refs) = unzip pairs + in + [ testGroup "Default slide formatting" noRefs + , testGroup "With `--reference-doc` pptx file" refs + ] + + +tests :: [TestTree] +tests = groupPptxTests [ pptxTests "Inline formatting" + def + "pptx/inline_formatting.native" + "pptx/inline_formatting.pptx" + , pptxTests "Slide breaks (default slide-level)" + def + "pptx/slide_breaks.native" + "pptx/slide_breaks.pptx" + , pptxTests "slide breaks (slide-level set to 1)" + 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" + "pptx/slide_breaks_toc.pptx" + , pptxTests "end notes" + def + "pptx/endnotes.native" + "pptx/endnotes.pptx" + , pptxTests "end notes, with table of contents" + def { writerTableOfContents = True } + "pptx/endnotes.native" + "pptx/endnotes_toc.pptx" + , pptxTests "images" + def + "pptx/images.native" + "pptx/images.pptx" + , pptxTests "two-column layout" + def + "pptx/two_column.native" + "pptx/two_column.pptx" + , pptxTests "speaker notes" + def + "pptx/speaker_notes.native" + "pptx/speaker_notes.pptx" + , pptxTests "remove empty slides" + def + "pptx/remove_empty_slides.native" + "pptx/remove_empty_slides.pptx" + + ] -- cgit v1.2.3