* test/fileutils/test_fileutils.rb (test_cp_preserve_permissions):
should test with setting :preserve option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb (test_chown_error): fix for Mac
OS X, whose getpwnam("") doesn't err. passwd & group databases
format is colon-separated, so user & group name can't contain a
colon.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/fileasserts.rb (assert_ownership_user): new
assertion for user ownership.
* test/fileutils/test_fileutils.rb (test_chown_error),
(test_chown_without_permission, test_chown_with_root):
based on the patch by vajrasky (Vajrasky Kok) at
[ruby-core:59298]. [Feature #9292]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb: enclose helper methods in a
module from global functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Process.groups for Windows. get rid of many errors introduced by
r44364.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/fileasserts.rb (assert_ownership_group): new
assertion for group ownership.
* test/fileutils/test_fileutils.rb (test_chown{,_verbose,_noop}):
based on the patch by vajrasky (Vajrasky Kok) at
[ruby-core:59281]. [Feature #9286]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
FileUtils.rmdir ignores Errno::ENOTEMPTY, so, in such cases, this
assertion is nonsence.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
as singleton method, or FileUtils.chmod fails in verbose mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit/assertions.rb (assert_raise_with_message): move from
test/fileutils/test_fileutils.rb. this is still experimental and
the interface may be changed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mode parser to support the permission symbols u/g/o and multiple
actions as defined in SUS, so that chmod("g=o+w", file) works as
expected. Invalid symbolic modes are now rejected with
ArgumentError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb (FileUtils.rmdir): use remove_tailing_slash.
* test/fileutils/test_fileutils.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb: add test for above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
directories on FileUtils.cp_r. The fix was proposed by Jan
Wedekind. [Bug #7246]
* test/fileutils/test_fileutils.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
caused error in verbose mode.
* test/fileutils/test_fileutils.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb (TestFileUtils#teardown):
do not assume cwd is TMPROOT and never remove current directory.
[ruby-core:47224][Bug #6884]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
patched by Jeremy Evans [ruby-core:38530] see #5097
* test/ruby/test_process.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Skip sticky bit test if the platform is FreeBSD. It doesn't allow to
change sticky bit if a target is regular file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The patch was written by takkanm. [ruby-core:26029][Feature #2190]
* lib/fileutils.rb (FileUtils#fu_mode): new helper function.
* lib/fileutils.rb (FileUtils#symbolic_modes_to_i): ditto.
* lib/fileutils.rb (FileUtils#mode_mask): ditto.
* lib/fileutils.rb (FileUtils#user_mask): ditto.
* test/fileutils/test_fileutils.rb (TestFileUtils#test_chmod_symbol_mode):
new test for the above symbolic mode.
* test/fileutils/test_fileutils.rb (TestFileUtils#test_chmod_R): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to still copy file permissions when :preserve is false (as cp does
this even when -p isn't set).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e