summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-27 06:29:34 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-27 06:29:34 +0000
commit3cf02cc03ebfd6be299c7ad08066df33dfbbc202 (patch)
tree531e7f1870e3c56a202c6b4f508ec08af03f69d0 /test
parentea12b3eb5387145e9445137e4528a563e9004435 (diff)
* 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
Diffstat (limited to 'test')
-rw-r--r--test/fileutils/test_fileutils.rb17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index a10bbe2369..a34da88421 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -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) {