* test/fileutils/test_fileutils.rb: do test in more deep directory.
* test/fileutils/test_nowrite.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
54e444d834
commit
7e42e5c01b
@ -1,3 +1,10 @@
|
|||||||
|
Tue Nov 25 20:02:14 2003 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* test/fileutils/test_fileutils.rb: do test in more deep
|
||||||
|
directory.
|
||||||
|
|
||||||
|
* test/fileutils/test_nowrite.rb: ditto.
|
||||||
|
|
||||||
Tue Nov 25 19:04:23 2003 Tanaka Akira <akr@m17n.org>
|
Tue Nov 25 19:04:23 2003 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
* lib/open-uri.rb (URI::Generic#find_proxy): ENV case sensitivity test
|
* lib/open-uri.rb (URI::Generic#find_proxy): ENV case sensitivity test
|
||||||
|
@ -37,7 +37,7 @@ class TestFileUtils < Test::Unit::TestCase
|
|||||||
|
|
||||||
def my_rm_rf( path )
|
def my_rm_rf( path )
|
||||||
if File.exist?('/bin/rm')
|
if File.exist?('/bin/rm')
|
||||||
system "/bin/rm -rf #{path}"
|
system %Q[/bin/rm -rf "#{path}"]
|
||||||
else
|
else
|
||||||
FileUtils.rm_rf path
|
FileUtils.rm_rf path
|
||||||
end
|
end
|
||||||
@ -45,7 +45,9 @@ class TestFileUtils < Test::Unit::TestCase
|
|||||||
|
|
||||||
def setup
|
def setup
|
||||||
@prevdir = Dir.pwd
|
@prevdir = Dir.pwd
|
||||||
Dir.chdir Dir.tmpdir
|
tmproot = "#{Dir.tmpdir}/fileutils.rb.#{$$}"
|
||||||
|
Dir.mkdir tmproot unless File.directory?(tmproot)
|
||||||
|
Dir.chdir tmproot
|
||||||
my_rm_rf 'data'; Dir.mkdir 'data'
|
my_rm_rf 'data'; Dir.mkdir 'data'
|
||||||
my_rm_rf 'tmp'; Dir.mkdir 'tmp'
|
my_rm_rf 'tmp'; Dir.mkdir 'tmp'
|
||||||
prepare_data_file
|
prepare_data_file
|
||||||
@ -53,9 +55,9 @@ class TestFileUtils < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
my_rm_rf 'data'
|
tmproot = Dir.pwd
|
||||||
my_rm_rf 'tmp'
|
|
||||||
Dir.chdir @prevdir
|
Dir.chdir @prevdir
|
||||||
|
my_rm_rf tmproot
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class TestNoWrite < Test::Unit::TestCase
|
|||||||
|
|
||||||
def my_rm_rf( path )
|
def my_rm_rf( path )
|
||||||
if File.exist?('/bin/rm')
|
if File.exist?('/bin/rm')
|
||||||
system "/bin/rm -rf #{path}"
|
system %Q[/bin/rm -rf "#{path}"]
|
||||||
else
|
else
|
||||||
FileUtils.rm_rf path
|
FileUtils.rm_rf path
|
||||||
end
|
end
|
||||||
@ -27,17 +27,19 @@ class TestNoWrite < Test::Unit::TestCase
|
|||||||
|
|
||||||
def setup
|
def setup
|
||||||
@prevdir = Dir.pwd
|
@prevdir = Dir.pwd
|
||||||
Dir.chdir Dir.tmpdir
|
tmproot = "#{Dir.tmpdir}/fileutils.rb.#{$$}"
|
||||||
my_rm_rf 'date'; Dir.mkdir 'data'
|
Dir.mkdir tmproot unless File.directory?(tmproot)
|
||||||
|
Dir.chdir tmproot
|
||||||
|
my_rm_rf 'data'; Dir.mkdir 'data'
|
||||||
my_rm_rf 'tmp'; Dir.mkdir 'tmp'
|
my_rm_rf 'tmp'; Dir.mkdir 'tmp'
|
||||||
File.open(SRC, 'w') {|f| f.puts 'dummy' }
|
File.open(SRC, 'w') {|f| f.puts 'dummy' }
|
||||||
File.open(COPY, 'w') {|f| f.puts 'dummy' }
|
File.open(COPY, 'w') {|f| f.puts 'dummy' }
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
my_rm_rf 'data'
|
tmproot = Dir.pwd
|
||||||
my_rm_rf 'tmp'
|
|
||||||
Dir.chdir @prevdir
|
Dir.chdir @prevdir
|
||||||
|
my_rm_rf tmproot
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_cp
|
def test_cp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user