зеркало из https://github.com/github/ruby.git
Skip time-related assertions on /dev/null
This commit is contained in:
Родитель
7e8802fa5b
Коммит
5b36fefc4e
|
@ -1517,9 +1517,12 @@ class TestFileExhaustive < Test::Unit::TestCase
|
|||
assert_equal(File.zero?(f), test(?z, f), f)
|
||||
|
||||
stat = File.stat(f)
|
||||
assert_equal(stat.atime, File.atime(f), f)
|
||||
assert_equal(stat.ctime, File.ctime(f), f)
|
||||
assert_equal(stat.mtime, File.mtime(f), f)
|
||||
unless stat.chardev?
|
||||
# /dev/null may be accessed by other processes
|
||||
assert_equal(stat.atime, File.atime(f), f)
|
||||
assert_equal(stat.ctime, File.ctime(f), f)
|
||||
assert_equal(stat.mtime, File.mtime(f), f)
|
||||
end
|
||||
assert_bool_equal(stat.blockdev?, File.blockdev?(f), f)
|
||||
assert_bool_equal(stat.chardev?, File.chardev?(f), f)
|
||||
assert_bool_equal(stat.directory?, File.directory?(f), f)
|
||||
|
|
Загрузка…
Ссылка в новой задаче