summaryrefslogtreecommitdiff
path: root/test/fileutils
AgeCommit message (Collapse)Author
2017-05-15Should call `ln_s` only when symlink is availableusa
* test/fileutils/test_fileutils.rb (test_ln_s): skip if symlink is not available. * test/fileutils/test_fileutils.rb (test_ln_s): remove created symlink certainly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17test_fileutils.rb: no broken symlinks on Cygwinnobu
* test/fileutils/test_fileutils.rb (no_broken_symlink): exclude test using broken symlinks on Cygwin, which are not allowed because of the directory flag of Windows native symlink. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17test_fileutils.rb: fix relative symlink pathnobu
* test/fileutils/test_fileutils.rb (test_rm_symlink): fix relative symlink path, the target should be relative to the directory in which the symlink gets created. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17test_fileutils.rb: workaround for Cygwinnobu
* test/fileutils/test_fileutils.rb (root_in_posix): seems Cygwin has some different conditions for privilege. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17test_fileutils.rb: cache distinct UIDsnobu
* test/fileutils/test_fileutils.rb: cache distinct UIDs as constants at initialization. assume no UIDs will be added/removed during tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-16fileutils.rb: do not make rootnobu
* lib/fileutils.rb (FileUtils#mkdir_p): no need to make root directory which should be exist and cannot be made with mkdir recent Cygwin can make a directory contains a colon. [Bug #13214] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07lib/fileutils.rb: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-24test_fileutils.rb: fix deadlocknobu
* test/fileutils/test_fileutils.rb (assert_output_lines): ensure that write pipe is closed, not the reader thread to deadlock when an exception raised in the given block. [ruby-core:78053] [Bug #12910] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-23test_fileutils.rb: Use primary group toonobu
* test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use primary group as well as supplementary groups. based on the patch by Vít Ondruch at [ruby-core:78053]. [Bug #12910] It might happen in certain environments (systemd-nspawn) that process has no supplementary groups, but primary groups should be enough to pass most of the tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-04fileutils.rb: fix error for non-existent entrynobu
* lib/fileutils.rb (FileUtils::Entry_#copy): ensure that the source entry exists first, to fix error for non-existent entry. [ruby-core:77885] [Bug #12892] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23test_fileutils.rb: use Dir.mktmpdirnobu
* test/fileutils/test_fileutils.rb: use Dir.mktmpdir instead of fixed name for temporary directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27FileUtils#install: owner/group optionsnobu
* 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
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06* test/fileutils/test_fileutils.rb: add debug output to investigate the ↵usa
error that occur at random on Windows CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-24relax error message formatnobu
* test/fileutils/test_fileutils.rb (test_uptodate): relax error message format. [Feature #9025], [ruby-core:71178] [Bug #11617] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-29test: try File.symlink with invalid pathsnobu
* test (have_symlink?): try File.symlink with invalid paths to test the administrator privilege, nil just raises an ArgumentError before trying the actual API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28test: File.symlink needs administrator privilegenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26test_fileutils.rb: improve my_rm_rfnobu
* test/fileutils/test_fileutils.rb (my_rm_rf): get rid of special chars and remove by rmdir on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-01fileutils.rb: fix error messagenobu
* lib/fileutils.rb (FileUtils#mv): show the exact target path in the error message instead of the destination parent directory name. patched by João Britto <jabcalves AT gmail.com> at [ruby-core:68706]. [Bug #11021] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11* test/fileutils/test_fileutils.rb: Use assert_join_threads.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-01test/fileutils/test_fileutils.rb: AIX does not allow a sticky bit on a ↵odaira
regular file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-12* lib/fileutils.rb: enable to remove with non-owner directory.hsbt
[ruby-dev:45976] [Bug #6756] * test/fileutils/test_fileutils.rb: add testcase for #6756. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11* lib/fileutils.rb: handle ENOENT error with symlink targeted tohsbt
non-exists file. [ruby-dev:45933] [Bug #6716] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-29test/fileutils/test_fileutils.rb: Close fds.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-25* test/fileutils/test_fileutils.rb ↵nagachika
(test_chown_dir_group_ownership_not_recursive): fix typos on comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-25* test/fileutils/test_fileutils.rb (test_chown_R): Add tests forhsbt
chown_R. [Feature #9383][ruby-core:59641] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-25* test/fileutils/test_fileutils.rb: Added recursively chmod tests.hsbt
[Feature #9303][ruby-core:59325] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16* test/fileutils/test_fileutils.rb: revert r45600.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16test_fileutils.rb: test :preserve optionnobu
* 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
2014-03-11* test: get rid of warnings.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-24* test/fiddle/test_function.rb: remove unused variables.hsbt
* test/fileutils/test_fileutils.rb: ditto. * test/io/console/test_io_console.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25test_fileutils.rb: fix for Mac OS Xnobu
* 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
2013-12-24test_fileutils.rb: fix testnobu
* test/fileutils/test_fileutils.rb (test_chown_error): splat uids. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24test_fileutils.rb: tests for chownnobu
* 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
2013-12-24test_fileutils.rb: enclose helper methodsnobu
* 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
2013-12-23* test/fileutils/test_fileutils.rb (setup): should not callusa
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
2013-12-23test_fileutils.rb: tests for chownnobu
* 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
2013-08-15* test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir):usa
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
2013-07-09* test/fileutils/fileasserts.rbknu
(Test::Unit::FileAssertions#{assert_filemode,assert_equal_timestamp}): New utility assertion methods for testing file modes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09* test/fileutils/test_fileutils.rbknu
(TestFileUtils#assert_output_lines): New utility assertion method for testing verbose output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09* lib/fileutils.rb (FileUtils#mode_to_s): Define mode_to_s() alsoknu
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
2013-07-09* test/fileutils/fileasserts.rbknu
(Test::Unit::FileAssertions#assert_not_symlink): Add a missing optional argument "message". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05test/unit: assert_raise_with_messagenobu
* 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
2013-07-04* lib/fileutils.rb (FileUtils.chmod{,_R}): Enhance the symbolicknu
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
2013-06-13fileutils.rb: fix traversal loopnobu
* lib/fileutils.rb (FileUtils#rmdir): fix traversal loop, not trying remove same directory only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13test_fileutils.rb: parents optionnobu
* test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir): add assertions for parents option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05add description of test in commentkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05* test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): addnaruse
EACCES for Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-03add EEXIST for Linuxkazu
* test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): add EEXIST for Linux. (suggested by nurse) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e