sw/qa/extras/mailmerge/data/tdf81750.odt |binary
 sw/qa/extras/mailmerge/mailmerge.cxx     |   19 +++++++++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 0830f50d794b36c85e0b701b7b3376b03f5e982d
Author:     Serge Krot <serge.k...@cib.de>
AuthorDate: Wed Jan 9 11:22:34 2019 +0100
Commit:     Thorsten Behrens <thorsten.behr...@cib.de>
CommitDate: Wed Jan 9 22:30:41 2019 +0100

    tdf#81750 new unit test: no duplication of field content
    
    Change-Id: I53eeca0dfad9176935a70b98a19b2ce044969031
    Reviewed-on: https://gerrit.libreoffice.org/66004
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/sw/qa/extras/mailmerge/data/tdf81750.odt 
b/sw/qa/extras/mailmerge/data/tdf81750.odt
new file mode 100644
index 000000000000..830db24e9954
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/tdf81750.odt differ
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index c614cc77a917..59cd2b512875 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -1110,5 +1110,24 @@ DECLARE_FILE_MAILMERGE_TEST(testTdf81782_file, 
"tdf78611.odt", "10-testing-addre
     }
 }
 
+// problem was: field content was duplicated & truncated
+DECLARE_SHELL_MAILMERGE_TEST(testTdf81750_shell, "tdf81750.odt", 
"10-testing-addresses.ods", "testing-addresses")
+{
+    // prepare unit test and run
+    executeMailMerge();
+
+    // reset currently opened layout of the original template,
+    // and create the layout of the document with 10 mails inside
+    dumpMMLayout();
+
+    // check several pages page
+    OUString aExpected("Text: Foo ");
+    CPPUNIT_ASSERT_EQUAL( aExpected, parseDump("/root/page[1]/body/txt[2]", 
""));
+    CPPUNIT_ASSERT_EQUAL( aExpected, parseDump("/root/page[3]/body/txt[2]", 
""));
+    CPPUNIT_ASSERT_EQUAL( aExpected, parseDump("/root/page[5]/body/txt[2]", 
""));
+    CPPUNIT_ASSERT_EQUAL( aExpected, parseDump("/root/page[7]/body/txt[2]", 
""));
+    CPPUNIT_ASSERT_EQUAL( aExpected, parseDump("/root/page[9]/body/txt[2]", 
""));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to