Skip to content

Commit

Permalink
* test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create,
Browse files Browse the repository at this point in the history
	TestGDBM2#test_writer_open_notexist): We only need to skip libgdbm 1.8.0,
	not all 1.8.x. 1.8.1 or later don't have GDBM_WRITER sickness.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
kosaki committed Jan 28, 2011
1 parent cb96213 commit 77a7137
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Jan 28 23:20:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>

* test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create,
TestGDBM2#test_writer_open_notexist): We only need to skip libgdbm 1.8.0,
not all 1.8.x. 1.8.1 or later don't have GDBM_WRITER sickness.

Fri Jan 28 21:56:57 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>

* ext/dbm/extconf.rb: Added new header places for Fedora13.
Expand Down
17 changes: 5 additions & 12 deletions test/gdbm/test_gdbm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_s_open_create_new
end
end
def test_s_open_no_create
skip "this test is failed on libgdbm 1.8.0" if /1\.8\./ =~ GDBM::VERSION
skip "gdbm_open(GDBM_WRITER) is broken on libgdbm 1.8.0" if /1\.8\.0/ =~ GDBM::VERSION
assert_nil(gdbm = GDBM.open("#{@tmpdir}/#{@prefix}", nil))
ensure
gdbm.close if gdbm
Expand Down Expand Up @@ -667,18 +667,11 @@ def test_reader_open_notexist
end

def test_writer_open_notexist
if /1\.8\./ =~ GDBM::VERSION
# 1.8.x are using O_RDWR|O_CREAT.
assert_nothing_raised {
GDBM.open("#{@tmproot}/a", 0666, GDBM::WRITER)
}
else
# 1.7.x are using O_RDWR.
assert_raise(Errno::ENOENT) {
GDBM.open("#{@tmproot}/a", 0666, GDBM::WRITER)
}
end
skip "gdbm_open(GDBM_WRITER) is broken on libgdbm 1.8.0" if /1\.8\.0/ =~ GDBM::VERSION

assert_raise(Errno::ENOENT) {
GDBM.open("#{@tmproot}/a", 0666, GDBM::WRITER)
}
end

def test_wrcreat_open_notexist
Expand Down

0 comments on commit 77a7137

Please sign in to comment.