From bd4dc9f6716184b443a6a29993fa851ef5fb3829 Mon Sep 17 00:00:00 2001 From: aamine Date: Sun, 2 May 2004 12:57:31 +0000 Subject: * 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 --- ChangeLog | 4 ++++ test/fileutils/test_fileutils.rb | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) 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 + + * test/fileutils/test_fileutils.rb (rm_f, rm_r): test :force flag. + Sun May 2 01:04:38 2004 Hidetoshi NAGAI * 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 -- cgit v1.2.3