diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-27 07:55:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-27 07:55:17 +0000 |
commit | 10fcca8f153e7d5265bed2a8b42e945f2be7819b (patch) | |
tree | 737f2309dda93c8a3e895b01feb25ba0e9c349e9 /test | |
parent | 71db7bd3d3c87a5390a54a409de06d672ca32b98 (diff) | |
download | ruby-10fcca8f153e7d5265bed2a8b42e945f2be7819b.tar.gz |
FileUtils#install: owner/group options
* lib/fileutils.rb (FileUtils#install): add owner and group
options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/fileutils/test_fileutils.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index f5ca9d21e2..63a4590cf0 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -968,6 +968,22 @@ class TestFileUtils < Test::Unit::TestCase } end + def test_install_owner_option + File.open('tmp/aaa', 'w') {|f| f.puts 'aaa' } + File.open('tmp/bbb', 'w') {|f| f.puts 'bbb' } + assert_nothing_raised { + install 'tmp/aaa', 'tmp/bbb', :owner => "nobody", :noop => true + } + end + + def test_install_group_option + File.open('tmp/aaa', 'w') {|f| f.puts 'aaa' } + File.open('tmp/bbb', 'w') {|f| f.puts 'bbb' } + assert_nothing_raised { + install 'tmp/aaa', 'tmp/bbb', :group => "nobody", :noop => true + } + end + def test_chmod check_singleton :chmod |