From a727681c02dbac90022c0da8d1d1e9b241303d62 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 15 May 2011 12:51:40 +0300 Subject: Fix lotuswordpro unit test on Windows file: URLs on Windows are of the form file:///c:/path/to/file , and the SRC_ROOT environment variable is of the form C:/lo/git/master, so we can't just concatenate "file://" and SRC_ROOT, but have to insert a "/". Windows programs don't understand Cygwin symlinks, so we have to specify the path from SRC_ROOT to lotuswordpro through an explicit clone/filters path. --- lotuswordpro/qa/cppunit/test_lotuswordpro.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lotuswordpro') diff --git a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx index 55916559dedf..276625397487 100644 --- a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx +++ b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx @@ -82,6 +82,10 @@ namespace const char* pSrcRoot = getenv( "SRC_ROOT" ); CPPUNIT_ASSERT_MESSAGE("SRC_ROOT env variable not set", pSrcRoot != NULL && pSrcRoot[0] != 0); +#ifdef WNT + if (pSrcRoot[1] == ':') + m_aSrcRoot += rtl::OUString::createFromAscii( "/" ); +#endif m_aSrcRoot += rtl::OUString::createFromAscii( pSrcRoot ); //Without this we're crashing because callees are using @@ -143,8 +147,8 @@ namespace void LotusWordProTest::test() { - recursiveScan(m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/lotuswordpro/qa/cppunit/data/pass")), true); - recursiveScan(m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/lotuswordpro/qa/cppunit/data/fail/")), false); + recursiveScan(m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/filters/lotuswordpro/qa/cppunit/data/pass")), true); + recursiveScan(m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/filters/lotuswordpro/qa/cppunit/data/fail/")), false); printf("LotusWordPro: tested %d files\n", m_nLoadedDocs); } -- cgit