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: clear all errors on Windows.

* test/fileutils/test_nowrite.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2003-09-27 00:44:50 +00:00
parent 11150ba747
commit 0be9d09430
3 changed files with 59 additions and 21 deletions

View file

@ -1,5 +1,5 @@
#
#
# test/fileutils/test_nowrite.rb
#
$:.unshift File.dirname(__FILE__)
@ -13,18 +13,27 @@ class TestNoWrite < Test::Unit::TestCase
include FileUtils::NoWrite
def my_rm_rf( path )
if File.exist?('/bin/rm')
system "/bin/rm -rf #{path}"
else
FileUtils.rm_rf path
end
end
SRC = 'data/src'
COPY = 'data/copy'
def setup
system 'rm -rf data; mkdir data'
system 'rm -rf tmp; mkdir tmp'
File.open( SRC, 'w' ) {|f| f.puts 'dummy' }
File.open( COPY, 'w' ) {|f| f.puts 'dummy' }
my_rm_rf 'date'; Dir.mkdir 'data'
my_rm_rf 'tmp'; Dir.mkdir 'tmp'
File.open(SRC, 'w') {|f| f.puts 'dummy' }
File.open(COPY, 'w') {|f| f.puts 'dummy' }
end
def teardown
system 'rm -rf data tmp'
my_rm_rf 'data'
my_rm_rf 'tmp'
end
def test_cp