diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-09 13:02:04 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-09 13:02:04 +0000 |
| commit | cafcbf60497bfb548bc1f11491e107d5c224fd9e (patch) | |
| tree | bad802710564ca06fda70804ed941e92fdb3ba71 /test/fileutils/test_fileutils.rb | |
| parent | b7a20fdf6100ff6e857b81ec9e076c6102893cc3 (diff) | |
| download | ruby-cafcbf60497bfb548bc1f11491e107d5c224fd9e.tar.gz ruby-cafcbf60497bfb548bc1f11491e107d5c224fd9e.tar.xz ruby-cafcbf60497bfb548bc1f11491e107d5c224fd9e.zip | |
* lib/fileutils.rb (FileUtils::Entry_#copy_file): open the source
file first to ensure it can be copied. [ruby-core:25498]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/fileutils/test_fileutils.rb')
| -rw-r--r-- | test/fileutils/test_fileutils.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 311719338..13df0fc13 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -223,6 +223,11 @@ end assert_same_entry srcpath, destpath end + assert_raise(Errno::ENOENT) { + cp 'tmp/cptmp', 'tmp/cptmp_new' + } + assert_file_not_exist('tmp/cptmp_new') + # src==dest (1) same path touch 'tmp/cptmp' assert_raise(ArgumentError) { |
