summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-02-15 22:00:50 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-02-15 22:00:50 +0000
commit2777e9c56527c97fc70a9b9e431673815f8860be (patch)
treeb83243ce6848f364dbb4649e72341f7af238ded1
parentTest and fix rename behaviour (diff)
downloadnetfs-2777e9c56527c97fc70a9b9e431673815f8860be.tar.bz2
netfs-2777e9c56527c97fc70a9b9e431673815f8860be.tar.xz
netfs-2777e9c56527c97fc70a9b9e431673815f8860be.zip
Test readlink on not a symlink
-rw-r--r--netfs/unittests/testCore.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp
index 0b5241d..ffdc411 100644
--- a/netfs/unittests/testCore.cpp
+++ b/netfs/unittests/testCore.cpp
@@ -244,6 +244,8 @@ BOOST_AUTO_TEST_CASE( files )
BOOST_AUTO_TEST_CASE( symlinks )
{
char buf[BUFSIZ];
+ BOOST_REQUIRE_EQUAL(fuse->mkdir("/dir", 0700), 0);
+ BOOST_REQUIRE_EQUAL(fuse->readlink("/dir", buf, BUFSIZ), -EINVAL);
BOOST_REQUIRE_EQUAL(fuse->symlink("/test2", "/test3"), 0);
BOOST_REQUIRE_EQUAL(fuse->symlink("/test2", "/test3"), -EEXIST);
BOOST_REQUIRE_EQUAL(fuse->readlink("/test3", buf, BUFSIZ), 0);