From 3d22fe530bd605bfe2cbdadd024fcb37fbbcae16 Mon Sep 17 00:00:00 2001 From: nagachika Date: Wed, 15 Oct 2014 14:51:58 +0000 Subject: 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 --- test/fileutils/test_fileutils.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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 -- cgit v1.2.3