[前][次][番号順一覧][スレッド一覧]

ruby-changes:18685

From: kosaki <ko1@a...>
Date: Fri, 28 Jan 2011 23:28:12 +0900 (JST)
Subject: [ruby-changes:18685] Ruby:r30710 (trunk): * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create,

kosaki	2011-01-28 23:23:04 +0900 (Fri, 28 Jan 2011)

  New Revision: 30710

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30710

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/test/gdbm/test_gdbm.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30709)
+++ ChangeLog	(revision 30710)
@@ -1,3 +1,9 @@
+Fri Jan 28 23:20:28 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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@g...>
 
 	* ext/dbm/extconf.rb: Added new header places for Fedora13.
Index: test/gdbm/test_gdbm.rb
===================================================================
--- test/gdbm/test_gdbm.rb	(revision 30709)
+++ test/gdbm/test_gdbm.rb	(revision 30710)
@@ -92,7 +92,7 @@
       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
@@ -667,18 +667,11 @@
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]