aboutsummaryrefslogtreecommitdiffstats
path: root/test/fileutils
Commit message (Collapse)AuthorAgeFilesLines
* * test/fileutils/fileasserts.rb (assert_equal_timestamp): new assertakr2007-11-211-1/+18
| | | | | | | | to test tv_sec only for filestamp resolution portability. (assert_same_entry): use assert_same_entry for mtime comparison. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* previous change refined.akr2007-11-191-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/fileasserts.rb (assert_equal_time): show nsec ifakr2007-11-192-2/+18
| | | | | | | | | | | assertion fails but time.to_s equals. (assert_same_entry): use assert_equal_time. * test/fileutils/test_fileutils.rb (test_install): use assert_equal_time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use ML ref. for assertion message.akr2007-11-181-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (check_singleton): fix to useko12007-02-141-1/+1
| | | | | | | | | | symbole instead of string. * test/io/nonblock/test_flush.rb: enable tests. * test/xmlrpc/test_webrick_server.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb: fix visibility of FileUtils::NoWrite, Verbose, DryRun. ↵aamine2005-09-233-7/+69
| | | | | | | | | | | [ruby-core:05954] * test/fileutils/test_nowrite.rb: test it. * test/fileutils/test_dryrun.rb: new file. * test/fileutils/test_verbose.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb: use module_function instead of single extend.aamine2005-09-181-0/+175
| | | | | | | * test/fileutils/test_fileutils.rb: test existence of singleton methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (remove_entry_secure): add documentation.aamine2005-05-261-8/+41
| | | | | | | * lib/fileutils.rb (remove_entry_secure): should not invoke unlink(2) against a directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (rm_r): use lchown(2), not chown(2). [ruby-dev:26226]aamine2005-05-251-26/+35
| | | | | | | | | | | | * lib/fileutils.rb (cd): remove :noop option. (FEATURE CHANGE) * lib/fileutils.rb (cp_r): should copy symlink as symlink, for also tree root. (FEATURE CHANGE) * lib/fileutils.rb (cp_r): new option :dereference_root. * lib/fileutils.rb: new method remove_entry. * lib/fileutils.rb: new method remove_entry_secure. * lib/fileutils.rb: add documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (remove_file): ignore exceptions caused by chmod.aamine2005-04-141-11/+28
| | | | | | | * lib/fileutils.rb (remove_dir): try to get rights to rmdir. [ruby-Bugs:1502] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (setup): support BSD style directory ↵aamine2005-01-261-2/+2
| | | | | | group inheritance (again). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: remove junk print statement.aamine2005-01-261-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (setup): support BSD style directory ↵aamine2005-01-262-13/+14
| | | | | | | | | group inheritance. [ruby-dev:25440] * test/fileutils/fileasserts.rb (assert_same_entry): show entry difference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (test_copy_entry): copy_entry copies only ↵aamine2005-01-081-2/+2
| | | | | | file type, not mtime. [ruby-dev:25383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (copy_stream): use read/write instead of ↵aamine2005-01-011-34/+113
| | | | | | | | | | sysread/syswrite, which allows duck typing. [ruby-dev:25369] * lib/fileutils.rb (copy_stream): does NOT support nonblocking IO. [ruby-dev:25370] * test/fileutils/test_fileutils.rb: test copy_entry, copy_file, copy_stream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (cp_r): tested wrong file name. ↵aamine2004-12-271-3/+14
| | | | | | [ruby-dev:25339] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb: (In previous commit) new method chown.aamine2004-12-041-0/+9
| | | | | | | | * lib/fileutils.rb: (In previous commit) new method chown_R. * lib/fileutils.rb: (In previous commit) new method chmod_R wrongly added. Removed now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (mkdir, mkdir_p): should chmod explicitly. [ruby-core:03881]aamine2004-12-041-4/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (mkdir_p): should pass mode argument to Dir.mkdir. ↵aamine2004-09-101-0/+8
| | | | | | | | | [ruby-dev:24242] * test/fileutils/test_fileutils.rb: test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (cp_r): copies symlink to symlink, except cp_r root.aamine2004-08-082-16/+72
| | | | | | | | * lib/fileutils.rb: new method FileUtils.copy_entry. * test/fileutils/test_fileutils.rb: more cp_r tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (fu_list): Array() breaks pathes including "\n". ↵aamine2004-05-071-0/+18
| | | | | | | | | [ruby-core:02843] * test/fileutils/test_fileutils.rb (mkdir): test "\n" in path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (rm_f, rm_r): test :force flag.aamine2004-05-021-0/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (test_rm_r): test if rm_rf can remove a ↵aamine2004-03-101-0/+9
| | | | | | symlink to the directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: rescue SystemCallError instead of ↵aamine2004-02-131-1/+1
| | | | | | EINVAL. File.link may raise EACCES on network file systems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: File.link raises EINVAL on Win9x. ↵aamine2004-02-121-2/+2
| | | | | | [ruby-dev:22713] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/*: remove $: trick. [ruby-dev:22763] use test/runner.rb tonahi2004-01-292-4/+0
| | | | | | | run test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: should not create anynobu2003-12-241-1/+13
| | | | | | | files or directories in current directory. [ruby-talk:88724] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (mkdir): remove trailing `/' from pathes.aamine2003-12-121-2/+17
| | | | | | | | | * lib/fileutils.rb (rmdir): ditto. [ruby-dev:22238] * lib/fileutils.rb (rmdir_r): ditto. * lib/fileutils.rb (fu_copy_dir): check if it is a directory after mkdir(2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (test_mkdir_p): test expand_path'ed path.aamine2003-12-111-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (test_cp): test if the error is kind of ↵aamine2003-12-041-9/+4
| | | | | | SystemCallError. It is needless details that which errno is set on each systems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: check if Pathnames are usable for arguments.aamine2003-12-021-0/+153
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (fu_each_src_dest0): call #to_str to allow Pathname for ↵aamine2003-12-011-15/+40
| | | | | | | | | arguments. [ruby-core:01795] * test/fileutils/test_fileutils.rb: does much strict test on "same" files detecting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (test_ln_s): should be a file, noteban2003-11-281-1/+1
| | | | | | | a directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: should take the existing symboliceban2003-11-261-1/+1
| | | | | | | link for OpenBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: do test in more deep directory.aamine2003-11-252-9/+13
| | | | | | | * test/fileutils/test_nowrite.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: chdir Dir.tmpdir before each test. ↵aamine2003-11-252-2/+10
| | | | | | | | | [ruby-dev:22045] * test/fileutils/test_nowrite.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (have_st_ino?): emx (OS/2 with EMX) does not have st_ino ↵aamine2003-11-201-16/+21
| | | | | | | | | | (always 0). [ruby-dev:21972] * lib/fileutils.rb (rename_cannot_overwrite_file?): emx does not allow overwriting files by rename(2). * test/fileutils/test_fileutils.rb: windows? -> have_drive_letter?, have_file_perm? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (fu_same?): check by inode instead of path name, to ↵aamine2003-11-181-6/+6
| | | | | | | | | detect two hard links pointing to the same content. * test/fileutils.rb: did not create correctly looped symlinks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (fu_each_src_dest): raise if src==dest. [ruby-talk:85344] ↵aamine2003-11-182-16/+92
| | | | | | | | | | | | | | | | | | [ruby-core:01699] * lib/fileutils.rb: use Object#is_a? instead of Class#=== to allow e.g. remote objects for receivers. * lib/fileutils.rb: FileTest -> File. * lib/fileutils.rb: put parentheses for arguments of File.xxxx? * test/fileutils/test_fileutils.rb (test_cp): test "cp a a". * test/fileutils/test_fileutils.rb (test_mv): test "mv a a". * test/fileutils/test_fileutils.rb (test_ln): test "ln a a". * test/fileutils/test_fileutils.rb (test_ln_s): test "ln_s a a". * test/fileutils/test_fileutils.rb (test_install): test "install a a". * test/fileutils/fileasserts.rb: new method assert_symlink. * test/fileutils/fileasserts.rb: assert_is_directory -> assert_directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: clean up temporaly symlink. [ruby-dev:21420]aamine2003-09-291-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb: clear all errors on Windows.aamine2003-09-272-21/+53
| | | | | | | * test/fileutils/test_nowrite.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/fileassertions.rb: new file.aamine2003-09-173-0/+452
* test/fileutils/test_fileutils.rb: new file. * test/fileutils/test_nowrite.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e