зеркало из https://github.com/github/ruby.git
* test/gdbm/test_gdbm.rb (test_s_open_create_new): Windows doesn't supports
UNIX like permittions. * test/gdbm/test_gdbm.rb (test_s_open_error): Errno::EWOULDBLOCK is raised on Windows in such case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fdc4326702
Коммит
3a08f62b4f
|
@ -83,7 +83,7 @@ if defined? GDBM
|
|||
begin
|
||||
assert_instance_of(GDBM, gdbm = GDBM.open("#{@tmpdir}/#{@prefix}"))
|
||||
gdbm.close
|
||||
assert_equal(File.stat("#{@tmpdir}/#{@prefix}").mode & 0777, 0666)
|
||||
assert_equal(File.stat("#{@tmpdir}/#{@prefix}").mode & 0777, 0666) unless /mswin|mignw/ =~ RUBY_PLATFORM
|
||||
assert_instance_of(GDBM, gdbm = GDBM.open("#{@tmpdir}/#{@prefix}2", 0644))
|
||||
gdbm.close
|
||||
assert_equal(File.stat("#{@tmpdir}/#{@prefix}2").mode & 0777, 0644)
|
||||
|
@ -198,7 +198,7 @@ if defined? GDBM
|
|||
|
||||
def test_s_open_error
|
||||
assert_instance_of(GDBM, gdbm = GDBM.open("#{@tmpdir}/#{@prefix}", 0))
|
||||
assert_raise(Errno::EACCES) {
|
||||
assert_raise(Errno::EACCES, Errno::EWOULDBLOCK) {
|
||||
GDBM.open("#{@tmpdir}/#{@prefix}", 0)
|
||||
}
|
||||
gdbm.close
|
||||
|
|
Загрузка…
Ссылка в новой задаче