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.
This commit is contained in:
parent
ff19ab5a45
commit
a727681c02
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue