1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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

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'