aboutsummaryrefslogtreecommitdiffstats
path: root/test/fileutils
Commit message (Collapse)AuthorAgeFilesLines
* Add frozen_string_literal: false for all filesnaruse2015-12-167-0/+7
| | | | | | 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
* * test/fileutils/test_fileutils.rb: add debug output to investigate the ↵usa2015-12-061-1/+6
| | | | | | 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
* relax error message formatnobu2015-10-241-1/+1
| | | | | | | * 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
* test: try File.symlink with invalid pathsnobu2015-08-291-1/+1
| | | | | | | | * 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
* test: File.symlink needs administrator privilegenobu2015-08-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_fileutils.rb: improve my_rm_rfnobu2015-08-261-1/+3
| | | | | | | * 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
* fileutils.rb: fix error messagenobu2015-04-011-1/+2
| | | | | | | | | * 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
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * 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
* * test/fileutils/test_fileutils.rb: Use assert_join_threads.akr2014-11-111-5/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb: AIX does not allow a sticky bit on a ↵odaira2014-10-011-2/+2
| | | | | | regular file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb: enable to remove with non-owner directory.hsbt2014-08-121-0/+8
| | | | | | | [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
* * lib/fileutils.rb: handle ENOENT error with symlink targeted tohsbt2014-07-111-0/+6
| | | | | | 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
* test/fileutils/test_fileutils.rb: Close fds.akr2014-05-291-7/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb ↵nagachika2014-05-251-2/+2
| | | | | | | | (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
* * test/fileutils/test_fileutils.rb (test_chown_R): Add tests forhsbt2014-05-251-5/+105
| | | | | | chown_R. [Feature #9383][ruby-core:59641] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: Added recursively chmod tests.hsbt2014-05-251-0/+35
| | | | | | [Feature #9303][ruby-core:59325] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: revert r45600.nobu2014-04-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_fileutils.rb: test :preserve optionnobu2014-04-161-1/+1
| | | | | | | * 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: get rid of warnings.usa2014-03-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fiddle/test_function.rb: remove unused variables.hsbt2014-02-241-1/+1
| | | | | | | * 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
* test_fileutils.rb: fix for Mac OS Xnobu2013-12-251-4/+8
| | | | | | | | | * 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.rb: fix testnobu2013-12-241-1/+1
| | | | | | * 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
* test_fileutils.rb: tests for chownnobu2013-12-242-1/+84
| | | | | | | | | | | * 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.rb: enclose helper methodsnobu2013-12-241-55/+54
| | | | | | | * 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
* * test/fileutils/test_fileutils.rb (setup): should not callusa2013-12-231-1/+1
| | | | | | | | 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.rb: tests for chownnobu2013-12-232-1/+54
| | | | | | | | | | * 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
* * test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir):usa2013-08-151-0/+1
| | | | | | | | 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
* * test/fileutils/fileasserts.rbknu2013-07-092-49/+66
| | | | | | | (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
* * test/fileutils/test_fileutils.rbknu2013-07-091-29/+27
| | | | | | | (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
* * lib/fileutils.rb (FileUtils#mode_to_s): Define mode_to_s() alsoknu2013-07-091-1/+17
| | | | | | 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
* * test/fileutils/fileasserts.rbknu2013-07-091-1/+1
| | | | | | | (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
* test/unit: assert_raise_with_messagenobu2013-07-051-24/+6
| | | | | | | | * 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
* * lib/fileutils.rb (FileUtils.chmod{,_R}): Enhance the symbolicknu2013-07-041-0/+26
| | | | | | | | | 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
* fileutils.rb: fix traversal loopnobu2013-06-131-0/+1
| | | | | | | * 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
* test_fileutils.rb: parents optionnobu2013-06-131-0/+8
| | | | | | | * 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
* add description of test in commentkazu2013-06-051-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): addnaruse2013-06-051-2/+2
| | | | | | EACCES for Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add EEXIST for Linuxkazu2013-06-031-1/+2
| | | | | | | * 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
* FileUtils.rmdir use remove_tailing_slashkazu2013-06-031-0/+8
| | | | | | | * 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
* * lib/fileutils.rb: fix behavior when mkdir/mkdir_p accepted "/".ayumin2013-06-031-0/+6
| | | | | | * 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
* * lib/fileutils.rb: Revert r34669 which altered the waydrbrain2013-03-014-46/+56
| | | | | | | | | | | | | metaprogramming in FileUtils occurred. [ruby-trunk - Bug #7958] * test/fileutils/visibility_tests.rb: Refactored tests of FileUtils options modules to expose bug found in #7958 * test/fileutils/test_dryrun.rb: ditto. * test/fileutils/test_nowrite.rb: ditto. * test/fileutils/test_verbose.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (copy_entry, wrap_traverse): preserve attributes ofmame2013-02-021-0/+16
| | | | | | | | | 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
* * lib/fileutils.rb: chmod/chmod_R with a string mode (e.g., "+x")mame2013-02-021-0/+21
| | | | | | | | 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
* make FileUtils tests safe when interrupting in setuperegon2012-08-211-2/+1
| | | | | | | | * 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
* * test/fileutils/test_fileutils.rb: add test for FileUtils#uptodate?ayumin2012-07-161-0/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use assert_equal, assert_match, and so on.nobu2012-05-071-56/+23
| | | | | | | | | | | | * test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on. * test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb, test/ruby/test_io_m17n.rb (assert_str_equal): ditto. * test/rubygems/test_gem_remote_fetcher.rb (assert_data_from_{server,proxy}): ditto. * test/test_pstore.rb (test_thread_safe): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add an assertion.akr2012-04-301-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (copy_metadata): use File.lchown and File.lchmod toakr2012-04-301-0/+11
| | | | | | | | update meta data of symlinks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb: refactored FileUtil methods to use thetenderlove2012-02-173-11/+15
| | | | | | | | | `define_command` API. Patch from 7rans <transfire@gmail.com> * test/fileutils/test_dryrun.rb: corresponding test refactoring * test/fileutils/test_nowrite.rb: ditto * test/fileutils/test_verbose.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (test_chmod_symbol_mode): Solarisngoto2011-08-241-2/+2
| | | | | | | seems to behave the same as FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e