diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-16 07:23:46 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-16 07:23:46 +0000 |
commit | 4110e5fa6213995e6c8561527e4c658e406405e9 (patch) | |
tree | a281bc406103d767ee89b8c0ae02997055a4237b /test/fileutils | |
parent | 9c1588a86d98a5fba4abd63fcec7573bf8089b83 (diff) |
merge revision(s) 46783: [Backport #6716]
* lib/fileutils.rb: handle ENOENT error with symlink targeted to
non-exists file. [ruby-dev:45933] [Bug #6716]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/fileutils')
-rw-r--r-- | test/fileutils/test_fileutils.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 640c3655f4..22f3e5864e 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -411,6 +411,12 @@ class TestFileUtils assert_raise(Errno::ELOOP) { mv 'tmp/symlink', 'tmp/symlink' } + # unexist symlink + File.symlink 'xxx', 'tmp/src' + assert_nothing_raised { + mv 'tmp/src', 'tmp/dest' + } + assert_equal true, File.symlink?('tmp/dest') end if have_symlink? def test_mv_pathname |