diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-11 07:51:19 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-11 07:51:19 +0000 |
commit | c2eac0e78c35fc7c23c4ec7024d7555b31d7bae6 (patch) | |
tree | 012c0d702f74de9dc5f487be06c7421b0c719c6b /test/fileutils | |
parent | 94bbd10ea71120d7f21e1025d1f1a3b804db770e (diff) | |
download | ruby-c2eac0e78c35fc7c23c4ec7024d7555b31d7bae6.tar.gz |
* 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/trunk@46783 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 5a5ce8f2c7..dd6f605ddb 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -445,6 +445,12 @@ class TestFileUtils < Test::Unit::TestCase 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 |