1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Skip tests when the lib is with gdbm 1.8.0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-12-06 04:40:04 +00:00
parent 2f49f5ee0b
commit 20c91cafba

View file

@ -104,13 +104,12 @@ if defined? DBM
assert_nil(dbm.close) assert_nil(dbm.close)
end end
=begin GDBM returns nil
def test_s_open_no_create def test_s_open_no_create
skip "gdbm_open(GDBM_WRITER) is broken on libgdbm 1.8.0" if /1\.8\.0/ =~ GDBM::VERSION
assert_nil(dbm = DBM.open("#{@tmpdir}/#{@prefix}", nil)) assert_nil(dbm = DBM.open("#{@tmpdir}/#{@prefix}", nil))
ensure ensure
dbm.close if dbm dbm.close if dbm
end end
=end
def test_s_open_with_block def test_s_open_with_block
assert_equal(DBM.open("#{@tmpdir}/#{@prefix}") { :foo }, :foo) assert_equal(DBM.open("#{@tmpdir}/#{@prefix}") { :foo }, :foo)
@ -529,13 +528,12 @@ if defined? DBM
} }
end end
=begin GDBM succeeds this
def test_writer_open_notexist def test_writer_open_notexist
skip "gdbm_open(GDBM_WRITER) is broken on libgdbm 1.8.0" if /1\.8\.0/ =~ GDBM::VERSION
assert_raise(Errno::ENOENT) { assert_raise(Errno::ENOENT) {
DBM.open("#{@tmproot}/a", 0666, DBM::WRITER) DBM.open("#{@tmproot}/a", 0666, DBM::WRITER)
} }
end end
=end
def test_wrcreat_open_notexist def test_wrcreat_open_notexist
v = DBM.open("#{@tmproot}/a", 0666, DBM::WRCREAT) v = DBM.open("#{@tmproot}/a", 0666, DBM::WRCREAT)