diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-10 13:41:43 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-10 13:41:43 +0000 |
commit | 3d92d0a135afef7dfc1b9530d3983d97d09fe9cb (patch) | |
tree | 7f3a2438f2acac9a0a80bce88ea8ba994ff3c633 /test | |
parent | fb9d31c32756b28a1bc39452535ad1126a388ea5 (diff) | |
download | ruby-3d92d0a135afef7dfc1b9530d3983d97d09fe9cb.tar.gz |
* 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
Diffstat (limited to 'test')
-rw-r--r-- | test/fileutils/test_fileutils.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 34d5a73882..726aa10490 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -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' |