Kaydet (Commit) ce760262 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

Handle *link return value in sfx2 test

Change-Id: I63008858558312b5fb7378249c56fbc3729c9a19
Reviewed-on: https://gerrit.libreoffice.org/72180
Tested-by: Jenkins
Reviewed-by: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst ccf3a060
......@@ -161,7 +161,8 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testHardLinks)
OString aOld = aTargetPath.toUtf8();
aTargetPath += ".2";
OString aNew = aTargetPath.toUtf8();
link(aOld.getStr(), aNew.getStr());
int nRet = link(aOld.getStr(), aNew.getStr());
CPPUNIT_ASSERT_EQUAL(0, nRet);
uno::Reference<lang::XComponent> xComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT(xComponent.is());
......@@ -171,7 +172,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testHardLinks)
struct stat buf;
// coverity[fs_check_call] - this is legitimate in the context of this text
int nRet = stat(aOld.getStr(), &buf);
nRet = stat(aOld.getStr(), &buf);
CPPUNIT_ASSERT_EQUAL(0, nRet);
// This failed: hard link count was 1, the hard link broke on store.
CPPUNIT_ASSERT(buf.st_nlink > 1);
......@@ -179,7 +180,8 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testHardLinks)
// Test that symlinks are preserved as well.
nRet = remove(aNew.getStr());
CPPUNIT_ASSERT_EQUAL(0, nRet);
symlink(aOld.getStr(), aNew.getStr());
nRet = symlink(aOld.getStr(), aNew.getStr());
CPPUNIT_ASSERT_EQUAL(0, nRet);
xStorable->storeToURL(aURL + ".2", {});
nRet = lstat(aNew.getStr(), &buf);
CPPUNIT_ASSERT_EQUAL(0, nRet);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment