Kaydet (Commit) 9dbaf6b3 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

tdf#95292 MM: add unit test

bEndOfDB was handled inconsistently in ToNextRecord for record
selections and normal record iteration.

This unit test checks mail merge to generate the correct amount
of three pages (actually five with the hidden, empty pages) for
a five record data subset, mailing a linked label document with
two labels. Previously the third / last page was missing.

On Windows, this test originally failed, because the test document
for synced labels opens the "synchronize" dialog, which is
generated from an UI file, which are missing in the default test

So this patch also switches the mail merge unit test to the
"instdir configuration", which has locking enabled and prevents
opening a documents twice. As a result we can't use a document for
two test and have to load the source document for inspection after
the UNO mail merge call, because it can just work with a file name
as the source document. This way the document isn't opened twice,
and the tests still pass on Windows.

Change-Id: I98b33defc403c40b84af44d91ed7fdcf6cf347a3
Reviewed-on: https://gerrit.libreoffice.org/23503Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst 0dd82f4f
......@@ -77,7 +77,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_mailmerge, \
xmloff/util/xo \
$(eval $(call gb_CppunitTest_use_configuration,sw_mailmerge))
$(eval $(call gb_CppunitTest_use_instdir_configuration,sw_mailmerge))
$(eval $(call gb_CppunitTest_use_ure,sw_mailmerge))
$(eval $(call gb_CppunitTest_use_vcl,sw_mailmerge))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment