From fb9f4d8129eeb12d751a9e5cd47848aa23182ea9 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 21 Aug 2011 17:44:30 +0300 Subject: [PATCH] Further attempt to make this test run on iOS --- .../qa/cppunit/i18npool_cppunittester_all.cxx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx b/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx index 1434dc9a296e..6fcead2a08b3 100644 --- a/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx +++ b/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx @@ -119,8 +119,24 @@ extern "C" CppUnitTestPlugIn SAL_IMPLEMENT_MAIN() { - putenv("UNO_SERVICES=services.rdb"); - putenv("UNO_TYPES=types.rdb udkapi.rdb"); + rtl::OUString sServices(RTL_CONSTASCII_USTRINGPARAM("UNO_SERVICES")); + rtl::OUString sTypes(RTL_CONSTASCII_USTRINGPARAM("UNO_TYPES")); + + rtl::OUString sBrandLocation(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/")); + + rtl::Bootstrap::expandMacros(sBrandLocation); + + rtl::OUString sServicesValue = rtl::OUStringBuffer(sBrandLocation) + . append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("services.rdb"))).makeStringAndClear(); + osl_setEnvironment(sServices.pData, sServicesValue.pData); + + rtl::OUString sTypesValue = rtl::OUStringBuffer(sBrandLocation) + .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("types.rdb"))) + .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "))) + .append(sBrandLocation) + .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("udkapi.rdb"))); + osl_setEnvironment(sTypes.pData, sTypesValue.pData); + TestPlugInSignature plugs[] = { cppunitTest_i18npool_breakiterator, NULL