* 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:
aamine 2004-03-10 13:41:43 +00:00
parent fb9d31c327
commit 3d92d0a135
1 changed files with 9 additions and 0 deletions

View File

@ -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'