diff options
author | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2022-02-20 15:41:01 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2022-02-20 17:06:28 +0100 |
commit | c4d42e0a37b761c5d35bd14ff4c395f13dde8553 (patch) | |
tree | ea7e44080ffb1ad266e762b1e0f85fbb5c6e6d73 | |
parent | dc6530f2599c56fbf2e8c24cc5d4833f4b847735 (diff) |
sw: add ODF-based feature test filesfeature/coverrest-featuretests
Start with a set of very basic text processing features, where each
test triggers one and only one high-level, user-visible feature
(like rendering bold text).
Change-Id: I08f66a67e8b5fe4af030415553c073242f965dfc
-rw-r--r-- | sw/CppunitTest_sw_odffeatures.mk | 64 | ||||
-rw-r--r-- | sw/Module_sw.mk | 1 | ||||
-rw-r--r-- | sw/qa/extras/odffeatures/basicodffeatures.cxx | 33 | ||||
-rw-r--r-- | sw/qa/extras/odffeatures/data/text_bold.odt | bin | 0 -> 8425 bytes | |||
-rw-r--r-- | sw/qa/extras/odffeatures/data/text_plain.odt | bin | 0 -> 8269 bytes |
5 files changed, 98 insertions, 0 deletions
diff --git a/sw/CppunitTest_sw_odffeatures.mk b/sw/CppunitTest_sw_odffeatures.mk new file mode 100644 index 000000000000..c1b6e562c4f9 --- /dev/null +++ b/sw/CppunitTest_sw_odffeatures.mk @@ -0,0 +1,64 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#************************************************************************* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#************************************************************************* + +$(eval $(call gb_CppunitTest_CppunitTest,sw_odffeatures)) + +$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_odffeatures)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sw_odffeatures, \ + sw/qa/extras/odffeatures/basicodffeatures \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,sw_odffeatures, \ + comphelper \ + editeng \ + cppu \ + cppuhelper \ + sal \ + svt \ + sfx \ + svl \ + sw \ + swqahelper \ + test \ + unotest \ + vcl \ + tl \ + utl \ +)) + +$(eval $(call gb_CppunitTest_use_externals,sw_odffeatures,\ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_set_include,sw_odffeatures,\ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/source/core/inc \ + -I$(SRCDIR)/sw/source/uibase/inc \ + -I$(SRCDIR)/sw/qa/inc \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_api,sw_odffeatures,\ + udkapi \ + offapi \ + oovbaapi \ +)) + +$(eval $(call gb_CppunitTest_use_ure,sw_odffeatures)) +$(eval $(call gb_CppunitTest_use_vcl,sw_odffeatures)) + +$(eval $(call gb_CppunitTest_use_rdb,sw_odffeatures,services)) + +$(eval $(call gb_CppunitTest_use_configuration,sw_odffeatures)) + +# vim: set noet sw=4 ts=4: diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index baaafcbc5b76..701237c3348d 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -104,6 +104,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_odfexport \ CppunitTest_sw_odfexport2 \ CppunitTest_sw_odfimport \ + CppunitTest_sw_odffeatures \ CppunitTest_sw_txtexport \ CppunitTest_sw_txtencexport \ CppunitTest_sw_txtimport \ diff --git a/sw/qa/extras/odffeatures/basicodffeatures.cxx b/sw/qa/extras/odffeatures/basicodffeatures.cxx new file mode 100644 index 000000000000..5fd26946ae43 --- /dev/null +++ b/sw/qa/extras/odffeatures/basicodffeatures.cxx @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <swmodeltestbase.hxx> + +#include <config_features.h> + +class Test : public SwModelTestBase +{ + public: + Test() : SwModelTestBase("/sw/qa/extras/odffeatures/data/", "writer8") {} +}; + +CPPUNIT_TEST_FIXTURE(Test, loadPlainODT) +{ + load(mpTestDocumentPath, "text_plain.odt"); + CPPUNIT_ASSERT_EQUAL( 1, getPages() ); +} + +CPPUNIT_TEST_FIXTURE(Test, loadBoldTextODT) +{ + load(mpTestDocumentPath, "text_bold.odt"); + CPPUNIT_ASSERT_EQUAL( 1, getPages() ); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/odffeatures/data/text_bold.odt b/sw/qa/extras/odffeatures/data/text_bold.odt Binary files differnew file mode 100644 index 000000000000..d899017328b1 --- /dev/null +++ b/sw/qa/extras/odffeatures/data/text_bold.odt diff --git a/sw/qa/extras/odffeatures/data/text_plain.odt b/sw/qa/extras/odffeatures/data/text_plain.odt Binary files differnew file mode 100644 index 000000000000..fa55c4c4522d --- /dev/null +++ b/sw/qa/extras/odffeatures/data/text_plain.odt |