From 9894d05fe3fd239247f755c60dc22247360be958 Mon Sep 17 00:00:00 2001 From: Agustín Martín Barbero Date: Sat, 26 Jan 2019 16:14:35 -0800 Subject: Improve writing metadata for docx, pptx and odt (#5252) * docx writer: support custom properties. Solves the writer part of #3024. Also supports additional core properties: `subject`, `lang`, `category`, `description`. * odt writer: improve standard properties, including the following core properties: `generator` (Pandoc/VERSION), `description`, `subject`, `keywords`, `initial-creator` (from authors), `creation-date` (actual creation date). Also fix date. * pptx writer: support custom properties. Also supports additional core properties: `subject`, `category`, `description`. * Includes golden tests. * MANUAL: document metadata support for docx, odt, pptx writers --- test/Tests/Writers/Docx.hs | 10 ++++++++++ test/Tests/Writers/Powerpoint.hs | 8 ++++++++ 2 files changed, 18 insertions(+) (limited to 'test/Tests/Writers') diff --git a/test/Tests/Writers/Docx.hs b/test/Tests/Writers/Docx.hs index d17984d63..c958ddf7d 100644 --- a/test/Tests/Writers/Docx.hs +++ b/test/Tests/Writers/Docx.hs @@ -156,4 +156,14 @@ tests = [ testGroup "inlines" "docx/custom_style.native" "docx/golden/custom_style_reference.docx" ] + , testGroup "metadata" + [ docxTest "document properties (core, custom)" + def + "docx/document-properties.native" + "docx/golden/document-properties.docx" + , docxTest "document properties (short description)" + def + "docx/document-properties-short-desc.native" + "docx/golden/document-properties-short-desc.docx" + ] ] diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs index f3016cdb6..9c5409310 100644 --- a/test/Tests/Writers/Powerpoint.hs +++ b/test/Tests/Writers/Powerpoint.hs @@ -99,4 +99,12 @@ tests = groupPptxTests [ pptxTests "Inline formatting" def "pptx/raw_ooxml.native" "pptx/raw_ooxml.pptx" + , pptxTests "metadata, custom properties" + def + "pptx/document-properties.native" + "pptx/document-properties.pptx" + , pptxTests "metadata, short description" + def + "pptx/document-properties-short-desc.native" + "pptx/document-properties-short-desc.pptx" ] -- cgit v1.2.3