diff options
-rw-r--r-- | bin/odfvalidator.sh.in | 2 | ||||
-rw-r--r-- | download.lst | 4 | ||||
-rw-r--r-- | include/test/bootstrapfixture.hxx | 2 | ||||
-rw-r--r-- | include/unotest/directories.hxx | 12 | ||||
-rw-r--r-- | sc/qa/unit/helper/qahelper.hxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/helper/xpath.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/helper/xpath.hxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 42 | ||||
-rw-r--r-- | test/source/bootstrapfixture.cxx | 17 | ||||
-rw-r--r-- | unotest/source/cpp/directories.cxx | 8 |
10 files changed, 55 insertions, 42 deletions
diff --git a/bin/odfvalidator.sh.in b/bin/odfvalidator.sh.in index 56e2f2985f04..605e74731f20 100644 --- a/bin/odfvalidator.sh.in +++ b/bin/odfvalidator.sh.in @@ -1,2 +1,2 @@ #!/usr/bin/env bash -java -Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl -Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl -jar @TARFILE_LOCATION@/@ODFVALIDATOR_JAR@ -e "$@" +java -Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl -Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl -jar @TARFILE_LOCATION@/@ODFVALIDATOR_JAR@ "$@" diff --git a/download.lst b/download.lst index 1186f2a6f586..205234a725dd 100644 --- a/download.lst +++ b/download.lst @@ -186,8 +186,8 @@ export NSS_TARBALL := nss-3.33-with-nspr-4.17.tar.gz export ODFGEN_SHA256SUM := 2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2 export ODFGEN_VERSION_MICRO := 6 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2 -export ODFVALIDATOR_SHA256SUM := 702413413a5d8076c17fe79c0808dfba145a7260020f6c8627ea529a0cf83769 -export ODFVALIDATOR_JAR := odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-475.jar +export ODFVALIDATOR_SHA256SUM := 984f2a479df79e27e7b01a5815ac53ae64e07746b882262d8a64566494515504 +export ODFVALIDATOR_JAR := odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar export OFFICEOTRON_SHA256SUM := f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770 export OFFICEOTRON_JAR := 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar export OPENLDAP_SHA256SUM := cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824 diff --git a/include/test/bootstrapfixture.hxx b/include/test/bootstrapfixture.hxx index 628e7b754bfe..a70dca82d6e6 100644 --- a/include/test/bootstrapfixture.hxx +++ b/include/test/bootstrapfixture.hxx @@ -54,7 +54,7 @@ public: virtual void setUp() override; - static void validate(const OUString& rURL, ValidationFormat); + void validate(const OUString& rURL, ValidationFormat) const; }; } diff --git a/include/unotest/directories.hxx b/include/unotest/directories.hxx index c1eaac83bafa..5a901c8781bf 100644 --- a/include/unotest/directories.hxx +++ b/include/unotest/directories.hxx @@ -27,20 +27,20 @@ private: public: Directories(); - const OUString& getSrcRootURL() { return m_aSrcRootURL; } - const OUString& getSrcRootPath() { return m_aSrcRootPath; } + const OUString& getSrcRootURL() const { return m_aSrcRootURL; } + const OUString& getSrcRootPath() const { return m_aSrcRootPath; } // return a URL to a given path from the source directory - OUString getURLFromSrc( const OUString& rPath ); + OUString getURLFromSrc(const OUString& rPath) const; // return a Path to a given path from the source directory - OUString getPathFromSrc( const OUString& rPath ); + OUString getPathFromSrc(const OUString& rPath) const; // return a URL to a given path from the workdir directory - OUString getURLFromWorkdir( const OUString &rPath ); + OUString getURLFromWorkdir(const OUString &rPath) const; // return a Path to a given path from the workdir directory - OUString getPathFromWorkdir( const OUString &rPath ); + OUString getPathFromWorkdir(const OUString &rPath) const; }; } diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 98fe290f9dc7..bc9f3db5d891 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -203,7 +203,7 @@ public: ScDocShellRef saveAndReload( ScDocShell* pShell, sal_Int32 nFormat ); - static std::shared_ptr<utl::TempFile> exportTo( ScDocShell* pShell, sal_Int32 nFormat ); + std::shared_ptr<utl::TempFile> exportTo(ScDocShell* pShell, sal_Int32 nFormat); void miscRowHeightsTest( TestParam const * aTestValues, unsigned int numElems ); }; diff --git a/sc/qa/unit/helper/xpath.cxx b/sc/qa/unit/helper/xpath.cxx index 562facc84f1e..a28b5851986d 100644 --- a/sc/qa/unit/helper/xpath.cxx +++ b/sc/qa/unit/helper/xpath.cxx @@ -18,9 +18,9 @@ #include <com/sun/star/packages/zip/ZipFileAccess.hpp> -xmlDocPtr XPathHelper::parseExport(ScDocShell& rShell, uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile, sal_Int32 nFormat) +xmlDocPtr XPathHelper::parseExport2(ScBootstrapFixture & rFixture, ScDocShell& rShell, uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile, sal_Int32 nFormat) { - std::shared_ptr<utl::TempFile> pTempFile = ScBootstrapFixture::exportTo(&rShell, nFormat); + std::shared_ptr<utl::TempFile> pTempFile = rFixture.exportTo(&rShell, nFormat); return parseExport(pTempFile, xSFactory, rFile); } diff --git a/sc/qa/unit/helper/xpath.hxx b/sc/qa/unit/helper/xpath.hxx index ddffd31a4585..f8ca5684c541 100644 --- a/sc/qa/unit/helper/xpath.hxx +++ b/sc/qa/unit/helper/xpath.hxx @@ -32,6 +32,8 @@ using namespace com::sun::star; +class ScBootstrapFixture; + namespace XPathHelper { /** @@ -44,7 +46,7 @@ namespace XPathHelper * test several files in the same exported xml file you need to export the file manually * and call the parseExport method that takes a TempFile */ - SCQAHELPER_DLLPUBLIC xmlDocPtr parseExport(ScDocShell& rShell, uno::Reference< lang::XMultiServiceFactory> const & xSFactory, + SCQAHELPER_DLLPUBLIC xmlDocPtr parseExport2(ScBootstrapFixture &, ScDocShell& rShell, uno::Reference< lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile, sal_Int32 nFormat); /** diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 105852550b6c..09364c8de62e 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -422,7 +422,7 @@ void ScExportTest::testTdf111876() ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/worksheets/_rels/sheet1.xml.rels", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/_rels/sheet1.xml.rels", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); OUString sTarget = getXPath(pDoc, "/r:Relationships/r:Relationship", "Target"); @@ -1302,7 +1302,7 @@ void ScExportTest::testBuiltinRangesXLSX() CPPUNIT_ASSERT(xDocSh.is()); xShell->DoClose(); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/workbook.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/workbook.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); //assert the existing OOXML built-in names are still there @@ -3073,7 +3073,7 @@ void ScExportTest::testRelativePathsODS() ScDocShellRef xDocSh = loadDoc("fdo79305.", FORMAT_ODS); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "content.xml", FORMAT_ODS); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "content.xml", FORMAT_ODS); CPPUNIT_ASSERT(pDoc); OUString aURL = getXPath(pDoc, "/office:document-content/office:body/office:spreadsheet/table:table/table:table-row[2]/table:table-cell[2]/text:p/text:a", "href"); @@ -3404,7 +3404,7 @@ void ScExportTest::testSheetTextBoxHyperlinkXLSX() ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "/xdr:wsDr[1]/xdr:twoCellAnchor[1]/xdr:sp[1]/xdr:nvSpPr[1]/xdr:cNvPr[1]/a:hlinkClick[1]", 1); @@ -3417,7 +3417,7 @@ void ScExportTest::testFontSizeXLSX() ScDocShellRef xDocSh = loadDoc("fontSize.", FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); OUString fontSize = getXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp[1]/xdr:txBody/a:p[1]/a:r[1]/a:rPr", "sz"); @@ -3433,7 +3433,7 @@ void ScExportTest::testSheetCharacterKerningSpaceXLSX() ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); OUString CharKerningSpace = getXPath(pDoc, @@ -3453,7 +3453,7 @@ void ScExportTest::testSheetCondensedCharacterSpaceXLSX() ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); OUString CondensedCharSpace = getXPath(pDoc, @@ -3470,7 +3470,7 @@ void ScExportTest::testTextUnderlineColorXLSX() ScDocShellRef xDocSh = loadDoc("underlineColor.", FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); // Make sure the underline type is double line assertXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor[1]/xdr:sp[1]/xdr:txBody/a:p[1]/a:r[1]/a:rPr", "u", "dbl"); @@ -3495,7 +3495,7 @@ void ScExportTest::testSheetRunParagraphPropertyXLSX() ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/sharedStrings.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/sharedStrings.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); OUString aColor = getXPath(pDoc, "/x:sst/x:si/x:r[1]/x:rPr[1]/x:color", "rgb"); @@ -3510,7 +3510,7 @@ void ScExportTest::testPreserveTextWhitespaceXLSX() ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/sharedStrings.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/sharedStrings.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "/x:sst/x:si/x:t", "space", "preserve"); xDocSh->DoClose(); @@ -3522,7 +3522,7 @@ void ScExportTest::testPreserveTextWhitespace2XLSX() ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/sharedStrings.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/sharedStrings.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "/x:sst/x:si[1]/x:t", "space", "preserve"); assertXPath(pDoc, "/x:sst/x:si[2]/x:r[1]/x:t", "space", "preserve"); @@ -3535,7 +3535,7 @@ void ScExportTest::testHiddenShapeXLSX() ScDocShellRef xDocSh = loadDoc("hiddenShape.", FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp[1]/xdr:nvSpPr/xdr:cNvPr", "hidden", "1"); } @@ -3545,7 +3545,7 @@ void ScExportTest::testHyperlinkXLSX() ScDocShellRef xDocSh = loadDoc("hyperlink.", FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/drawings/_rels/drawing1.xml.rels", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/_rels/drawing1.xml.rels", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "/r:Relationships/r:Relationship", "Target", "#Sheet2!A1"); } @@ -3721,7 +3721,7 @@ void ScExportTest::testMatrixMultiplicationXLSX() ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); OUString CellFormulaRange = getXPath(pDoc, @@ -3847,7 +3847,7 @@ void ScExportTest::testTextDirectionXLSX() ScDocShellRef xDocSh = loadDoc("writingMode.", FORMAT_XLSX); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "/x:styleSheet/x:cellXfs/x:xf[2]/x:alignment", "readingOrder", "1");//LTR @@ -3859,7 +3859,7 @@ void ScExportTest::testTdf88657ODS() ScDocShellRef xDocSh = loadDoc("tdf88657.", FORMAT_ODS); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "styles.xml", FORMAT_ODS); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "styles.xml", FORMAT_ODS); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "//number:fraction", "min-denominator-digits", "3"); @@ -3870,7 +3870,7 @@ void ScExportTest::testConditionalFormatRangeListXLSX() ScDocShellRef xDocSh = loadDoc("conditionalformat_rangelist.", FORMAT_ODS); CPPUNIT_ASSERT(xDocSh.is()); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "//x:conditionalFormatting", "sqref", "F4 F10"); @@ -3883,7 +3883,7 @@ void ScExportTest::testEscapeCharInNumberFormatXLSX() xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX); CPPUNIT_ASSERT( xDocSh.is() ); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); const sal_Unicode cEuro (8364); // € symbol @@ -3910,7 +3910,7 @@ void ScExportTest::testNatNumInNumberFormatXLSX() xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX); // Convert [NatNum5] to [DBNum2] in Chinese CPPUNIT_ASSERT( xDocSh.is() ); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", "[DBNum2][$-804]General;[RED][DBNum2][$-804]General"); @@ -3947,7 +3947,7 @@ void ScExportTest::testExtendedLCIDXLSX() xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX); CPPUNIT_ASSERT( xDocSh.is() ); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); // Check export assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", "[$-107041E]DD\\-MM\\-YYYY"); @@ -4018,7 +4018,7 @@ void ScExportTest::testHyperlinkTargetFrameODS() OUString aTargetFrame = pURLData->GetTargetFrame(); CPPUNIT_ASSERT_EQUAL(OUString("_blank"), aTargetFrame); - xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "content.xml", FORMAT_ODS); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "content.xml", FORMAT_ODS); CPPUNIT_ASSERT(pDoc); OUString aTargetFrameExport = getXPath(pDoc, "/office:document-content/office:body/office:spreadsheet/table:table/table:table-row[2]/table:table-cell[2]/text:p/text:a", "target-frame-name"); diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index 184f4ad34c52..5f5d4d9bad4b 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -137,7 +137,7 @@ OString loadFile(const OUString& rURL) } #endif -void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFormat eFormat ) +void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFormat eFormat) const { #if HAVE_EXPORT_VALIDATION OUString var; @@ -166,12 +166,23 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor CPPUNIT_ASSERT_MESSAGE( OUString("empty get env var " + var).toUtf8().getStr(), !aValidator.isEmpty()); - aValidator += " "; + + if (eFormat == test::ODF) + { + aValidator += " -e -M " + + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng") + + " -D " + + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng") + + " -O " + + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng") + + " -m " + + m_directories.getPathFromSrc("/schema/mathml2/mathml2.xsd"); + } utl::TempFile aOutput; aOutput.EnableKillingFile(); OUString aOutputFile = aOutput.GetFileName(); - OUString aCommand = aValidator + rPath + " > " + aOutputFile; + OUString aCommand = aValidator + " " + rPath + " > " + aOutputFile; int returnValue = system(OUStringToOString(aCommand, RTL_TEXTENCODING_UTF8).getStr()); CPPUNIT_ASSERT_EQUAL_MESSAGE( diff --git a/unotest/source/cpp/directories.cxx b/unotest/source/cpp/directories.cxx index 3cda732c0413..6635fafa030f 100644 --- a/unotest/source/cpp/directories.cxx +++ b/unotest/source/cpp/directories.cxx @@ -41,22 +41,22 @@ test::Directories::Directories() { m_aWorkdirRootURL = getFileURLFromSystemPath(m_aWorkdirRootPath); } -OUString test::Directories::getURLFromSrc( const OUString& rPath ) +OUString test::Directories::getURLFromSrc(const OUString& rPath) const { return m_aSrcRootURL + rPath; } -OUString test::Directories::getPathFromSrc(const OUString& rPath) +OUString test::Directories::getPathFromSrc(const OUString& rPath) const { return m_aSrcRootPath + rPath; } -OUString test::Directories::getURLFromWorkdir( const OUString& rPath ) +OUString test::Directories::getURLFromWorkdir(const OUString& rPath) const { return m_aWorkdirRootURL + rPath; } -OUString test::Directories::getPathFromWorkdir( const OUString& rPath ) +OUString test::Directories::getPathFromWorkdir(const OUString& rPath) const { return m_aWorkdirRootPath + rPath; } |