aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2012-01-24 17:53:56 +0200
committerMartin Pärtel <martin.partel@gmail.com>2012-01-24 17:53:56 +0200
commit0c816b382b3ad7cba38733f68cae96d78dfde06d (patch)
tree7369746791b377381215630e23a73ac35568942c /tests
parentd8286ccf49e01e6abbac953c08c713f82a01f116 (diff)
downloadbindfs-0c816b382b3ad7cba38733f68cae96d78dfde06d.tar.gz
Added --hide-hard-links option.
Patch by fbogner http://code.google.com/p/bindfs/issues/detail?id=17
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_bindfs.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 4c21de2..ea2e7e2 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -91,7 +91,14 @@ testenv("--ctime-from-mtime") do
# to_i gives us prceision of 1 sec
assert { File.stat(mf).ctime.to_i == File.stat(mf).mtime.to_i }
assert { File.stat(sf).ctime > File.stat(sf).mtime }
-
+end
+
+testenv("--hide-hard-links") do
+ touch('src/one')
+ ln('src/one', 'src/two')
+
+ assert { File.stat('src/one').nlink == 2 }
+ assert { File.stat('mnt/one').nlink == 1 }
end
# Define expectation for changing [uid, gid, both]