diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2014-11-05 19:27:19 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-11-06 16:55:06 +0100 |
commit | 53eeff46cd98e1fb497023f4fe30e9421c189127 (patch) | |
tree | 9b1203a461fdb04d2db46a88ed7c106f6abc55a5 | |
parent | 74720747d9c93b6d54dc7550a05b90b9b7d5a8a8 (diff) |
basic test of mail merge working
Change-Id: Ia72d1b2827bfb38ab39d7d0df04908874d25e124
-rw-r--r-- | sw/qa/extras/mailmerge/data/10-testing-addresses.ods | bin | 0 -> 12130 bytes | |||
-rw-r--r-- | sw/qa/extras/mailmerge/data/simple-mail-merge.odt | bin | 0 -> 8363 bytes | |||
-rw-r--r-- | sw/qa/extras/mailmerge/mailmerge.cxx | 15 |
3 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/mailmerge/data/10-testing-addresses.ods b/sw/qa/extras/mailmerge/data/10-testing-addresses.ods Binary files differnew file mode 100644 index 000000000000..33b82e65a28b --- /dev/null +++ b/sw/qa/extras/mailmerge/data/10-testing-addresses.ods diff --git a/sw/qa/extras/mailmerge/data/simple-mail-merge.odt b/sw/qa/extras/mailmerge/data/simple-mail-merge.odt Binary files differnew file mode 100644 index 000000000000..34637d4ef48f --- /dev/null +++ b/sw/qa/extras/mailmerge/data/simple-mail-merge.odt diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx index 4ee150326630..78573b3e2a64 100644 --- a/sw/qa/extras/mailmerge/mailmerge.cxx +++ b/sw/qa/extras/mailmerge/mailmerge.cxx @@ -149,6 +149,21 @@ DECLARE_FILE_MAILMERGE_TEST(testMissingDefaultLineColor, "missing-default-line-c CPPUNIT_ASSERT_EQUAL( OUString( "#000000" ), getXPath(pXmlDoc, "/office:document-styles/office:styles/style:default-style[1]/style:graphic-properties", "stroke-color")); } +DECLARE_FILE_MAILMERGE_TEST(testSimpleMailMerge, "simple-mail-merge.odt", "10-testing-addresses.ods", "testing-addresses") +{ + executeMailMerge(); + for( int doc = 0; + doc < 10; + ++doc ) + { + loadMailMergeDocument( doc ); + CPPUNIT_ASSERT_EQUAL( 1, getPages()); + CPPUNIT_ASSERT_EQUAL( OUString( "Fixed text." ), getRun( getParagraph( 1 ), 1 )->getString()); + CPPUNIT_ASSERT_EQUAL( OUString( "lastname" + OUString::number( doc + 1 )), getRun( getParagraph( 2 ), 1 )->getString()); + CPPUNIT_ASSERT_EQUAL( OUString( "Another fixed text." ), getRun( getParagraph( 3 ), 1 )->getString()); + } +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |