diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2016-03-30 21:45:38 +0100 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2016-03-30 21:45:38 +0100 |
commit | 26a30c6d09e4972355a9d369a2fcf70df4e7a6ce (patch) | |
tree | fbd6ca143d40547ed76288a8f74e373575d43e9d /tests/test_bindfs.rb | |
parent | 8e1732726b2b803f1cea87c2ae8f553ab451e8fe (diff) | |
download | bindfs-26a30c6d09e4972355a9d369a2fcf70df4e7a6ce.tar.gz |
Added test case for issue #30 and improved an earlier test case.
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-x | tests/test_bindfs.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb index 1711559..9a4d33c 100755 --- a/tests/test_bindfs.rb +++ b/tests/test_bindfs.rb @@ -95,11 +95,23 @@ root_testenv("", :title => "--create-as-user should be default for root") do end testenv("--create-with-perms=og=r:ogd+x") do - touch('src/file') - mkdir('src/dir') + with_umask(0077) do + touch('mnt/file') + mkdir('mnt/dir') + end + + assert { File.stat('mnt/file').mode & 0777 == 0644 } + assert { File.stat('mnt/dir').mode & 0777 == 0755 } +end + +testenv("--create-with-perms=g+rD") do + with_umask(0077) do + touch('mnt/file') + mkdir('mnt/dir') + end - assert { File.stat('mnt/file').mode & 0077 == 0044 } - assert { File.stat('mnt/dir').mode & 0077 == 0055 } + assert { File.stat('src/file').mode & 0777 == 0640 } + assert { File.stat('src/dir').mode & 0777 == 0750 } end testenv("-p 0777 --realistic-permissions", :title => '--realistic-permissions') do |