[Libreoffice-commits] core.git: desktop/qa
Andras Timar (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 5 06:21:32 UTC 2020
desktop/qa/desktop_lib/test_desktop_lib.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 2897383dc831bca0db1ff040dc9f96a3611d262e
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Wed Nov 4 23:11:26 2020 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Nov 5 06:56:28 2020 +0100
use a utl::TempFile and clean it up after test
Change-Id: I1cbe7fd8002f6ba54532135de935805dd6a4e0e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105319
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 5d44a289af0f..74d9bcede0cf 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2797,12 +2797,13 @@ void DesktopLOKTest::testCalcSaveAs()
Scheduler::ProcessEventsToIdle();
// Save as a new file.
- OUString aNewFileUrl = "file:///tmp/saveas.ods";
- pDocument->pClass->saveAs(pDocument, aNewFileUrl.toUtf8().getStr(), nullptr, nullptr);
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "ods", nullptr);
closeDoc();
// Load the new document and verify that the in-flight changes are saved.
- pDocument = loadDocUrl(aNewFileUrl, LOK_DOCTYPE_SPREADSHEET);
+ pDocument = loadDocUrl(aTempFile.GetURL(), LOK_DOCTYPE_SPREADSHEET);
CPPUNIT_ASSERT(pDocument);
ViewCallback aView(pDocument);
More information about the Libreoffice-commits
mailing list