[Libreoffice-commits] core.git: xmlsecurity/qa

Stephan Bergmann sbergman at redhat.com
Wed Mar 28 19:18:02 UTC 2018


 xmlsecurity/qa/unit/signing/signing.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 0ff64e31b0c74b9b1e78a1d5ddd7be4302f33df3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 28 16:57:02 2018 +0200

    Copy test doc to temp location before opening read/write
    
    ...otherwise fails if SRCDIR is a read-only tree
    
    Change-Id: I0b81be5ba055dac133e5ee638f21c3c5f4d5736b
    Reviewed-on: https://gerrit.libreoffice.org/52015
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index b342adeeb80d..9d1f9240caef 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -331,7 +331,12 @@ void SigningTest::testOOXMLRemove()
     // Load the test document as a storage and read its signatures: purpose1 and purpose2.
     DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content);
     CPPUNIT_ASSERT(aManager.init());
-    OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "multi.docx";
+    utl::TempFile aTempFile;
+    aTempFile.EnableKillingFile();
+    OUString aURL = aTempFile.GetURL();
+    CPPUNIT_ASSERT_EQUAL(
+        osl::File::RC::E_None,
+        osl::File::copy(m_directories.getURLFromSrc(DATA_DIRECTORY) + "multi.docx", aURL));
     uno::Reference <embed::XStorage> xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL(ZIP_STORAGE_FORMAT_STRING, aURL, embed::ElementModes::READWRITE);
     CPPUNIT_ASSERT(xStorage.is());
     aManager.mxStore = xStorage;


More information about the Libreoffice-commits mailing list