summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-02 12:57:31 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-02 12:57:31 +0000
commitbd4dc9f6716184b443a6a29993fa851ef5fb3829 (patch)
tree738f07cb6237f031021c1c03a8af64f05f649b93
parenta9e658faf0e92df97a2332381f2f0106c57a5acd (diff)
* 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
-rw-r--r--ChangeLog4
-rw-r--r--test/fileutils/test_fileutils.rb19
2 files changed, 23 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b1d02562cf..9d1aa75ba3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index 726aa10490..6d8810b8f8 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -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