summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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