diff options
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-x | tests/test_bindfs.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb index 69a5e70..49f2332 100755 --- a/tests/test_bindfs.rb +++ b/tests/test_bindfs.rb @@ -18,6 +18,8 @@ # along with bindfs. If not, see <http://www.gnu.org/licenses/>. # +Dir.chdir(File.dirname(__FILE__)) + # if we are being run by make check it will set srcdir and we should use it $LOAD_PATH << (ENV['srcdir'] || '.') @@ -892,6 +894,14 @@ if `uname`.strip != 'FreeBSD' # -o dev is not supported on FreeBSD end end +# PR #95 +testenv("-ouser -onofail,nouser,delete-deny -o users -o auto,rename-deny,noauto -o chmod-deny,_netdev", :title => "filtering special options") do + touch('src/file') + assert_exception(EPERM) { rm('mnt/file') } + assert_exception(EPERM) { File.rename('mnt/file', 'mnt/file2') } + assert_exception(EPERM) { chmod(0777, 'mnt/file') } +end + # FIXME: this stuff around testenv is a hax, and testenv may also exit(), which defeats the 'ensure' below. # the test setup ought to be refactored. It might well use MiniTest or something. # TODO: support FreeBSD in this test (different group management commands) |