aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_bindfs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-xtests/test_bindfs.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 1a407a1..738eef8 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#
-# Copyright 2006,2007,2008,2009,2010,2012 Martin Pärtel <martin.partel@gmail.com>
+# Copyright 2006,2007,2008,2009,2010,2012,2019 Martin Pärtel <martin.partel@gmail.com>
#
# This file is part of bindfs.
#
@@ -66,6 +66,20 @@ testenv("-u nobody -g #{nobody_group}") do
assert { File.stat('mnt/file').gid == nobody_gid }
end
+testenv("-u #{nobody_uid} -g #{nobody_gid}", :title => "numeric UID and GID") do
+ touch('src/file')
+
+ assert { File.stat('mnt/file').uid == nobody_uid }
+ assert { File.stat('mnt/file').gid == nobody_gid }
+end
+
+testenv("-u 55544 -g 55566", :title => "nonexistent UID and GID") do
+ touch('src/file')
+
+ assert { File.stat('mnt/file').uid == 55544 }
+ assert { File.stat('mnt/file').gid == 55566 }
+end
+
testenv("-p 0600:u+D") do
touch('src/file')
chmod(0777, 'src/file')