mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/fileutils/test_fileutils.rb (cp_r): tested wrong file name. [ruby-dev:25339]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ea12b3eb53
commit
3cf02cc03e
2 changed files with 19 additions and 3 deletions
|
@ -68,7 +68,7 @@ class TestFileUtils
|
|||
|
||||
include FileUtils
|
||||
|
||||
def my_rm_rf( path )
|
||||
def my_rm_rf(path)
|
||||
if File.exist?('/bin/rm')
|
||||
system %Q[/bin/rm -rf "#{path}"]
|
||||
else
|
||||
|
@ -235,8 +235,8 @@ end
|
|||
|
||||
cp_r 'data', 'tmp2', :preserve => true
|
||||
TARGETS.each do |fname|
|
||||
assert_same_entry fname, "tmp/#{fname}"
|
||||
assert_same_file fname, "tmp/#{fname}"
|
||||
assert_same_entry fname, "tmp2/#{File.basename(fname)}"
|
||||
assert_same_file fname, "tmp2/#{File.basename(fname)}"
|
||||
end
|
||||
|
||||
# a/* -> b/*
|
||||
|
@ -294,6 +294,17 @@ end
|
|||
assert_same_file fname, 'tmp/mvdest'
|
||||
end
|
||||
|
||||
# [ruby-talk:124368]
|
||||
mkdir 'tmp/tmpdir'
|
||||
mkdir_p 'tmp/dest2/tmpdir'
|
||||
assert_raises(Errno::EISDIR) {
|
||||
mv 'tmp/tmpdir', 'tmp/dest2'
|
||||
}
|
||||
mkdir 'tmp/dest2/tmpdir/junk'
|
||||
assert_raises(Errno::EISDIR) {
|
||||
mv 'tmp/tmpdir', 'tmp/dest2'
|
||||
}
|
||||
|
||||
# src==dest (1) same path
|
||||
touch 'tmp/cptmp'
|
||||
assert_raises(ArgumentError) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue