summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-02-15 20:25:16 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-02-15 20:25:16 +0000
commit6bb65b06c3b13bf2394cff8dbcd2531b5c1a1337 (patch)
tree29e35a180fa5b82e59801c5fa88209fda2a5cdfc
parentTest file behaviour (diff)
downloadnetfs-6bb65b06c3b13bf2394cff8dbcd2531b5c1a1337.tar.bz2
netfs-6bb65b06c3b13bf2394cff8dbcd2531b5c1a1337.tar.xz
netfs-6bb65b06c3b13bf2394cff8dbcd2531b5c1a1337.zip
Test symlink behaviour
-rw-r--r--netfs/unittests/testCore.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp
index 2f1c512..8a0d38b 100644
--- a/netfs/unittests/testCore.cpp
+++ b/netfs/unittests/testCore.cpp
@@ -241,6 +241,16 @@ BOOST_AUTO_TEST_CASE( files )
BOOST_REQUIRE_EQUAL(fuse->unlink("/test3"), -ENOENT);
}
+BOOST_AUTO_TEST_CASE( symlinks )
+{
+ char buf[BUFSIZ];
+ BOOST_REQUIRE_EQUAL(fuse->symlink("/test2", "/test3"), 0);
+ BOOST_REQUIRE_EQUAL(fuse->readlink("/test3", buf, BUFSIZ), 0);
+ BOOST_REQUIRE_EQUAL("/test2", buf);
+ BOOST_REQUIRE_EQUAL(fuse->unlink("/test3"), 0);
+ BOOST_REQUIRE_EQUAL(fuse->unlink("/test3"), -ENOENT);
+}
+
BOOST_AUTO_TEST_SUITE_END();
BOOST_AUTO_TEST_CASE( testNoAuthNoPass )