diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-15 14:51:58 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-15 14:51:58 +0000 |
commit | 3d22fe530bd605bfe2cbdadd024fcb37fbbcae16 (patch) | |
tree | 04989baca0ffef375df367f1bd9b68a8a7c25478 /test | |
parent | da85f4ee544634c66c32028018bb8042d00cd73b (diff) |
merge revision(s) r46783: [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_1@47953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 c5f8734fea..6aa89c49ef 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -420,6 +420,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 |