sw: fix hyphenation dependencies of CppunitTests
testTdf123898 fails locally but passes on Jenkins, because in Jenkins builds the hyphenation data doesn't exist yet (as verified by a CPPUNIT_ASSERT(xHyphenator->hasLocale(lang::Locale("de", "DE", OUString()))) in first revision of this patch. Add makefile dependencies to all sw tests that call hasLocale(). The test still needs to check though in case --without-myspell-dicts is used. Failure looks ignorable, adapt the test: Test name: (anonymous namespace)::testTdf123898::TestBody equality assertion failed - Expected: PortionType::Para - Actual : PortionType::Text Change-Id: Iaa94e248b01f7bab7f8451f6b0ff08a7d0a8e9b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168669 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
parent
c77d656806
commit
5f191abb7b
5 changed files with 37 additions and 1 deletions
|
@ -72,6 +72,14 @@ $(eval $(call gb_CppunitTest_use_uiconfigs,sw_odfexport2, \
|
|||
|
||||
$(eval $(call gb_CppunitTest_use_more_fonts,sw_odfexport2))
|
||||
|
||||
ifneq ($(filter DICTIONARIES,$(BUILD_TYPE)),)
|
||||
$(eval $(call gb_CppunitTest_use_packages,sw_odfexport2,\
|
||||
$(call gb_Dictionary_get_packagename,dict-de) \
|
||||
$(call gb_Dictionary_get_packagename,dict-en) \
|
||||
$(call gb_Dictionary_get_packagename,dict-hu) \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_arguments,sw_odfexport2, \
|
||||
-env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
|
||||
))
|
||||
|
|
|
@ -89,6 +89,14 @@ $(eval $(call gb_CppunitTest_set_non_application_font_use,sw_layoutwriter$(1),ab
|
|||
|
||||
$(eval $(call gb_CppunitTest_use_more_fonts,sw_layoutwriter$(1)))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_packages,sw_layoutwriter$(1),\
|
||||
$(if $(filter DICTIONARIES,$(BUILD_TYPE)),
|
||||
$(call gb_Dictionary_get_packagename,dict-de) \
|
||||
$(call gb_Dictionary_get_packagename,dict-en) \
|
||||
$(call gb_Dictionary_get_packagename,dict-hu) \
|
||||
) \
|
||||
))
|
||||
|
||||
endef
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
|
|
@ -86,6 +86,14 @@ $(call gb_CppunitTest_get_target,sw_ooxmlexport$(1)) : $(call gb_Library_get_tar
|
|||
|
||||
$(eval $(call gb_CppunitTest_use_more_fonts,sw_ooxmlexport$(1)))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_packages,sw_ooxmlexport$(1),\
|
||||
$(if $(filter DICTIONARIES,$(BUILD_TYPE)),
|
||||
$(call gb_Dictionary_get_packagename,dict-de) \
|
||||
$(call gb_Dictionary_get_packagename,dict-en) \
|
||||
$(call gb_Dictionary_get_packagename,dict-hu) \
|
||||
) \
|
||||
))
|
||||
|
||||
ifeq ($(OS),WNT)
|
||||
# gpgme-w32spawn.exe is needed in workdir/LinkTarget/Executable
|
||||
$(eval $(call gb_CppunitTest_use_packages,sw_ooxmlexport$(1),\
|
||||
|
|
|
@ -1246,13 +1246,17 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf123898)
|
|||
// Make sure spellchecker has done its job already
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
|
||||
uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator();
|
||||
if (!xHyphenator->hasLocale(lang::Locale("de", "DE", OUString())))
|
||||
return;
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
// Make sure that the arrow on the left is not there (the first portion's type is
|
||||
// PortionType::Arrow if it's there)
|
||||
assertXPath(
|
||||
pXmlDoc,
|
||||
"/root/page/body/txt/anchored/fly/txt/SwParaPortion/SwLineLayout[1]/child::*[1]"_ostr,
|
||||
"type"_ostr, u"PortionType::Para"_ustr);
|
||||
"type"_ostr, u"PortionType::Text"_ustr);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf123651)
|
||||
|
|
|
@ -96,6 +96,14 @@ $(call gb_CppunitTest_get_target,sw_uiwriter$(1)) : $(call gb_Library_get_target
|
|||
|
||||
$(eval $(call gb_CppunitTest_use_more_fonts,sw_uiwriter$(1)))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_packages,sw_uiwriter$(1),\
|
||||
$(if $(filter DICTIONARIES,$(BUILD_TYPE)),
|
||||
$(call gb_Dictionary_get_packagename,dict-de) \
|
||||
$(call gb_Dictionary_get_packagename,dict-en) \
|
||||
$(call gb_Dictionary_get_packagename,dict-hu) \
|
||||
) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_arguments,sw_uiwriter$(1), \
|
||||
-env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
|
||||
))
|
||||
|
|
Loading…
Reference in a new issue