зеркало из https://github.com/github/ruby.git
* test/fileutils/test_fileutils.rb (test_rm_r): test if rm_rf can remove a symlink to the directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fb9d31c327
Коммит
3d92d0a135
|
@ -365,6 +365,15 @@ end
|
|||
assert_file_not_exist 'tmp/tmpdir'
|
||||
assert_file_exist 'tmp'
|
||||
|
||||
if have_symlink?
|
||||
# [ruby-talk:94635] a symlink to the directory
|
||||
Dir.mkdir 'tmp/tmpdir'
|
||||
File.symlink '..', 'tmp/tmpdir/symlink_to_dir'
|
||||
rm_r 'tmp/tmpdir'
|
||||
assert_file_not_exist 'tmp/tmpdir'
|
||||
assert_file_exist 'tmp'
|
||||
end
|
||||
|
||||
# pathname
|
||||
Dir.mkdir 'tmp/tmpdir1'; touch 'tmp/tmpdir1/tmp'
|
||||
Dir.mkdir 'tmp/tmpdir2'; touch 'tmp/tmpdir2/tmp'
|
||||
|
|
Загрузка…
Ссылка в новой задаче