summaryrefslogtreecommitdiff
path: root/test/fileutils
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-20 03:27:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-20 03:27:59 +0000
commit878384483d99fd4b887c5ddf44765b4178e72e42 (patch)
tree12a790b28d34fb35e5406846d4624f6e1ca06f38 /test/fileutils
parentb698066bbd6a760658a38971958adf08f0ec685c (diff)
* lib/fileutils.rb (FileUtils::Entry_#copy): check file name
spearator boundary. [ruby-core:31360] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/fileutils')
-rw-r--r--test/fileutils/test_fileutils.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index f385589..494204c 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -286,6 +286,15 @@ class TestFileUtils
assert_directory 'tmp/cpr_dest/d'
my_rm_rf 'tmp/cpr_src'
my_rm_rf 'tmp/cpr_dest'
+
+ bug3588 = '[ruby-core:31360]'
+ assert_nothing_raised(ArgumentError, bug3588) do
+ cp_r 'tmp', 'tmp2'
+ end
+ assert_directory 'tmp2/tmp'
+ assert_raise(ArgumentError, bug3588) do
+ cp_r 'tmp2', 'tmp2/new_tmp2'
+ end
end
def test_cp_r_symlink