* test/fileutils/test_fileutils.rb (setup): support BSD style directory group inheritance. [ruby-dev:25440]
* test/fileutils/fileasserts.rb (assert_same_entry): show entry difference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4b62150e0b
commit
19b9567c84
@ -1,3 +1,11 @@
|
|||||||
|
Thu Jan 27 00:02:40 2005 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* test/fileutils/test_fileutils.rb (setup): support BSD style
|
||||||
|
directory group inheritance. [ruby-dev:25440]
|
||||||
|
|
||||||
|
* test/fileutils/fileasserts.rb (assert_same_entry): show entry
|
||||||
|
difference.
|
||||||
|
|
||||||
Wed Jan 26 14:12:58 2005 NAKAMURA Usaku <usa@ruby-lang.org>
|
Wed Jan 26 14:12:58 2005 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* ext/Setup*: remove tcltklib.
|
* ext/Setup*: remove tcltklib.
|
||||||
|
@ -13,18 +13,13 @@ module Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
def assert_same_entry(from, to)
|
def assert_same_entry(from, to)
|
||||||
_wrap_assertion {
|
|
||||||
assert_block("entry #{from} != #{to}") {
|
|
||||||
a = File.stat(from)
|
a = File.stat(from)
|
||||||
b = File.stat(to)
|
b = File.stat(to)
|
||||||
|
assert_equal a.mode, b.mode, "mode #{a.mode} != #{b.mode}"
|
||||||
a.mode == b.mode and
|
#assert_equal a.atime, b.atime
|
||||||
#a.atime == b.atime and
|
assert_equal a.mtime, b.mtime, "mtime #{a.mtime} != #{b.mtime}"
|
||||||
a.mtime == b.mtime and
|
assert_equal a.uid, b.uid, "uid #{a.uid} != #{b.uid}"
|
||||||
a.uid == b.uid and
|
assert_equal a.gid, b.gid, "gid #{a.gid} != #{b.gid}"
|
||||||
a.gid == b.gid
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_file_exist(path)
|
def assert_file_exist(path)
|
||||||
|
@ -14,6 +14,7 @@ prevdir = Dir.pwd
|
|||||||
tmproot = TestFileUtils::TMPROOT
|
tmproot = TestFileUtils::TMPROOT
|
||||||
Dir.mkdir tmproot unless File.directory?(tmproot)
|
Dir.mkdir tmproot unless File.directory?(tmproot)
|
||||||
Dir.chdir tmproot
|
Dir.chdir tmproot
|
||||||
|
p tmproot
|
||||||
|
|
||||||
def have_drive_letter?
|
def have_drive_letter?
|
||||||
/djgpp|mswin(?!ce)|mingw|bcc|emx/ =~ RUBY_PLATFORM
|
/djgpp|mswin(?!ce)|mingw|bcc|emx/ =~ RUBY_PLATFORM
|
||||||
@ -76,10 +77,15 @@ class TestFileUtils
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def mymkdir(path)
|
||||||
|
Dir.mkdir path
|
||||||
|
File.chown nil, Process.gid, path if have_file_perm?
|
||||||
|
end
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@prevdir = Dir.pwd
|
@prevdir = Dir.pwd
|
||||||
tmproot = TMPROOT
|
tmproot = TMPROOT
|
||||||
Dir.mkdir tmproot unless File.directory?(tmproot)
|
mymkdir tmproot unless File.directory?(tmproot)
|
||||||
Dir.chdir 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'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user