From 7980631a0b0f8508a8f8d74419d9f740a40e524c Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Thu, 23 Jun 2016 10:46:01 -0400 Subject: Docx reader: add tests for comments We test for comments, using all track-changes options. Note that we should only output comments if `--track-changes=all`. We also test for emitting warnings if there is complicated formatting. --- tests/Tests/Readers/Docx.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/Tests/Readers') diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs index a1315446a..a9a9094f1 100644 --- a/tests/Tests/Readers/Docx.hs +++ b/tests/Tests/Readers/Docx.hs @@ -291,6 +291,30 @@ tests = [ testGroup "inlines" "move text (all)" "docx/track_changes_move.docx" "docx/track_changes_move_all.native" + , testCompareWithOpts def{readerTrackChanges=AcceptChanges} + "comments (accept -- no comments)" + "docx/comments.docx" + "docx/comments_no_comments.native" + , testCompareWithOpts def{readerTrackChanges=RejectChanges} + "comments (reject -- comments)" + "docx/comments.docx" + "docx/comments_no_comments.native" + , testCompareWithOpts def{readerTrackChanges=AllChanges} + "comments (all comments)" + "docx/comments.docx" + "docx/comments.native" + , testForWarningsWithOpts def{readerTrackChanges=AcceptChanges} + "comment warnings (accept -- no warnings)" + "docx/comments_warning.docx" + [] + , testForWarningsWithOpts def{readerTrackChanges=RejectChanges} + "comment warnings (reject -- no warnings)" + "docx/comments_warning.docx" + [] + , testForWarningsWithOpts def{readerTrackChanges=AllChanges} + "comment warnings (all)" + "docx/comments_warning.docx" + ["Docx comment 1 will not retain formatting"] ] , testGroup "media" [ testMediaBag -- cgit v1.2.3