mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/fileutils.rb (cp_r): default is :dereference_root=>true for backward compatibility. [ruby-dev:27145]
* test/fileutils/test_fileutils.rb (test_cp_r): test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
610c690769
commit
524ad518b6
3 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Mon Sep 19 10:36:06 2005 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/fileutils.rb (cp_r): default is :dereference_root=>true for
|
||||
backward compatibility. [ruby-dev:27145]
|
||||
|
||||
* test/fileutils/test_fileutils.rb (test_cp_r): test it.
|
||||
|
||||
Mon Sep 19 09:57:39 2005 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* test/fileutils/test_fileutils.rb: backported from trunk (1.36).
|
||||
|
|
|
@ -418,6 +418,7 @@ module FileUtils
|
|||
fu_check_options options, :preserve, :noop, :verbose, :dereference_root
|
||||
fu_output_message "cp -r#{options[:preserve] ? 'p' : ''} #{[src,dest].flatten.join ' '}" if options[:verbose]
|
||||
return if options[:noop]
|
||||
options[:dereference_root] = true unless options.key?(:dereference_root)
|
||||
fu_each_src_dest(src, dest) do |s, d|
|
||||
copy_entry s, d, options[:preserve], options[:dereference_root]
|
||||
end
|
||||
|
|
|
@ -296,7 +296,10 @@ if have_symlink?
|
|||
cp_r 'tmp/cpr_src2', 'tmp/cpr_dest2'
|
||||
assert_directory 'tmp/cpr_dest2'
|
||||
#assert_not_symlink 'tmp/cpr_dest2'
|
||||
assert_symlink 'tmp/cpr_dest2' # 2005-05-26: feature change
|
||||
# * 2005-05-26: feature change on trunk
|
||||
#assert_symlink 'tmp/cpr_dest2'
|
||||
# * 2005-09-19: revert for 1.8 (:dereference_root => true by default)
|
||||
assert_not_symlink 'tmp/cpr_dest2'
|
||||
assert_symlink 'tmp/cpr_dest2/symlink'
|
||||
assert_equal 'SLdest', File.readlink('tmp/cpr_dest2/symlink')
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue