From eda5540719e9771b48f15aa7f431033163e1f161 Mon Sep 17 00:00:00 2001 From: Diego Balseiro Date: Tue, 6 Oct 2020 23:03:00 -0500 Subject: DOCX reader: Allow empty dates in comments and tracked changes (#6726) For security reasons, some legal firms delete the date from comments and tracked changes. * Make date optional (Maybe) in tracked changes and comments datatypes * Add tests --- test/Tests/Readers/Docx.hs | 4 ++++ test/Tests/Writers/Docx.hs | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'test/Tests') diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs index 80abc38f6..12007f502 100644 --- a/test/Tests/Readers/Docx.hs +++ b/test/Tests/Readers/Docx.hs @@ -405,6 +405,10 @@ tests = [ testGroup "document" "paragraph insertion/deletion (all)" "docx/paragraph_insertion_deletion.docx" "docx/paragraph_insertion_deletion_all.native" + , testCompareWithOpts def{readerTrackChanges=AllChanges} + "paragraph insertion/deletion (all)" + "docx/track_changes_scrubbed_metadata.docx" + "docx/track_changes_scrubbed_metadata.native" , testForWarningsWithOpts def{readerTrackChanges=AcceptChanges} "comment warnings (accept -- no warnings)" "docx/comments_warning.docx" diff --git a/test/Tests/Writers/Docx.hs b/test/Tests/Writers/Docx.hs index ccd31642a..8f051b4b7 100644 --- a/test/Tests/Writers/Docx.hs +++ b/test/Tests/Writers/Docx.hs @@ -150,6 +150,11 @@ tests = [ testGroup "inlines" def "docx/comments.native" "docx/golden/comments.docx" + , docxTest + "scrubbed metadata" + def + "docx/track_changes_scrubbed_metadata.native" + "docx/golden/track_changes_scrubbed_metadata.docx" ] , testGroup "custom styles" [ docxTest "custom styles without reference.docx" -- cgit v1.2.3