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

ruby-changes:16178

From: usa <ko1@a...>
Date: Thu, 3 Jun 2010 10:24:50 +0900 (JST)
Subject: [ruby-changes:16178] Ruby:r28141 (trunk): * test/gdbm/test_gdbm.rb (test_s_open_create_new): Windows doesn't supports

usa	2010-06-03 10:24:42 +0900 (Thu, 03 Jun 2010)

  New Revision: 28141

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

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

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

Index: test/gdbm/test_gdbm.rb
===================================================================
--- test/gdbm/test_gdbm.rb	(revision 28140)
+++ test/gdbm/test_gdbm.rb	(revision 28141)
@@ -83,7 +83,7 @@
       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 @@
 
     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

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

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