summaryrefslogtreecommitdiff
path: root/sfx2/qa/cppunit/test_misc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/qa/cppunit/test_misc.cxx')
-rw-r--r--sfx2/qa/cppunit/test_misc.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index fa3a2c1bca6d..83c4c8db77f7 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -186,6 +186,15 @@ void MiscTest::testHardLinks()
// This failed: hard link count was 1, the hard link broke on store.
CPPUNIT_ASSERT(buf.st_nlink > 1);
+ // Test that symlinks are presreved as well.
+ remove(aNew.getStr());
+ symlink(aOld.getStr(), aNew.getStr());
+ xStorable->storeToURL(aURL + ".2", {});
+ nRet = lstat(aNew.getStr(), &buf);
+ CPPUNIT_ASSERT_EQUAL(0, nRet);
+ // This failed, the hello.odt.2 symlink was replaced with a real file.
+ CPPUNIT_ASSERT(bool(S_ISLNK(buf.st_mode)));
+
xComponent->dispose();
#endif
}