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 (rm_f, rm_r): test :force flag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2004-05-02 12:57:31 +00:00
parent a9e658faf0
commit bd4dc9f671
2 changed files with 23 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Sun May 2 21:56:48 2004 Minero Aoki <aamine@loveruby.net>
* test/fileutils/test_fileutils.rb (rm_f, rm_r): test :force flag.
Sun May 2 01:04:38 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tcltklib, ext/tk: renewal Ruby/Tk

View file

@ -321,6 +321,14 @@ end
# rm_f 'tmpdatadir'
Dir.rmdir 'tmpdatadir'
Dir.mkdir 'tmp/tmpdir'
File.open('tmp/tmpdir/a', 'w') {|f| f.puts 'dummy' }
File.open('tmp/tmpdir/c', 'w') {|f| f.puts 'dummy' }
rm_f ['tmp/tmpdir/a', 'tmp/tmpdir/b', 'tmp/tmpdir/c']
assert_file_not_exist 'tmp/tmpdir/a'
assert_file_not_exist 'tmp/tmpdir/c'
Dir.rmdir 'tmp/tmpdir'
# pathname
touch 'tmp/rmtmp1'
touch 'tmp/rmtmp2'
@ -365,6 +373,14 @@ end
assert_file_not_exist 'tmp/tmpdir'
assert_file_exist 'tmp'
Dir.mkdir 'tmp/tmpdir'
File.open('tmp/tmpdir/a', 'w') {|f| f.puts 'dummy' }
File.open('tmp/tmpdir/c', 'w') {|f| f.puts 'dummy' }
rm_r ['tmp/tmpdir/a', 'tmp/tmpdir/b', 'tmp/tmpdir/c'], :force => true
assert_file_not_exist 'tmp/tmpdir/a'
assert_file_not_exist 'tmp/tmpdir/c'
Dir.rmdir 'tmp/tmpdir'
if have_symlink?
# [ruby-talk:94635] a symlink to the directory
Dir.mkdir 'tmp/tmpdir'
@ -646,4 +662,7 @@ end
}
end
def test_chmod
end
end