summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configmgr/source/components.cxx12
-rw-r--r--sc/CppunitTest_sc_macros_test.mk1
-rw-r--r--sc/qa/unit/macros-test.cxx4
-rw-r--r--test/prj/d.lst5
-rw-r--r--test/user-template/user/data/registrymodifications.xcu (renamed from test/user-template/user/registrymodifications.xcu)0
5 files changed, 19 insertions, 3 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index f6257b6cdbf4..0549f8a14c93 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -520,7 +520,17 @@ Components::Components(
parseXcsXcuLayer( 0, aUnitTestDir );
// next is required for the (somewhat strange) filter configuration
parseModuleLayer( 1, aUnitTestDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/spool")));
- parseModificationLayer();
+ // allow a directory to be specified to allow extra configuration to be stored
+ // for example to place a registrymodifications.xcu to override some configuration
+ rtl::OUString extra;
+ if (rtl::Bootstrap::get(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "OOO_CONFIG_REGISTRY_EXTRA_DIR")),
+ extra))
+ {
+ parseXcsXcuLayer(3, extra);
+ }
return;
}
diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk
index 8a9bd3dacade..0da63485bfe7 100644
--- a/sc/CppunitTest_sc_macros_test.mk
+++ b/sc/CppunitTest_sc_macros_test.mk
@@ -100,6 +100,7 @@ $(eval $(call gb_CppunitTest_set_args,sc_macros_test,\
--headless \
--protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
-env:OOO_CONFIG_REGISTRY_DIR=$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) \
+ -env:OOO_CONFIG_REGISTRY_EXTRA_DIR=$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/user) \
))
# we need to
diff --git a/sc/qa/unit/macros-test.cxx b/sc/qa/unit/macros-test.cxx
index 067a2559b924..a971d2068272 100644
--- a/sc/qa/unit/macros-test.cxx
+++ b/sc/qa/unit/macros-test.cxx
@@ -129,10 +129,10 @@ public:
CPPUNIT_TEST_SUITE(ScMacrosTest);
//enable this test if you want to play with star basic macros in unit tests
//works but does nothing useful yet
-// CPPUNIT_TEST(testStarBasic);
+ CPPUNIT_TEST(testStarBasic);
//enable if you want to hack vba support for unit tests
//does not work, still problems during loading
-// CPPUNIT_TEST(testVba);
+ CPPUNIT_TEST(testVba);
CPPUNIT_TEST_SUITE_END();
diff --git a/test/prj/d.lst b/test/prj/d.lst
index 9211e33b9131..9ec65baa9c7b 100644
--- a/test/prj/d.lst
+++ b/test/prj/d.lst
@@ -6,3 +6,8 @@ mkdir: %_DEST%\inc\test
..\%__SRC%\lib\libtest.dll.a %_DEST%\lib\libtest.dll.a
..\inc\test\testdllapi.hxx %_DEST%\inc\test\testdllapi.hxx
..\inc\test\bootstrapfixture.hxx %_DEST%\inc\test\bootstrapfixture.hxx
+mkdir: %_DEST%\unittest
+mkdir: %_DEST%\unittest\user
+mkdir: %_DEST%\unittest\user\data
+..\user-template\user\data\registrymodifications.xcu %_DEST%\unittest\user\data\registrymodifications.xcu
+
diff --git a/test/user-template/user/registrymodifications.xcu b/test/user-template/user/data/registrymodifications.xcu
index cdfda4a723a3..cdfda4a723a3 100644
--- a/test/user-template/user/registrymodifications.xcu
+++ b/test/user-template/user/data/registrymodifications.xcu