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

ruby-changes:33928

From: nobu <ko1@a...>
Date: Mon, 19 May 2014 08:35:09 +0900 (JST)
Subject: [ruby-changes:33928] nobu:r46009 (trunk): test_etc.rb: omit unrunnable tests

nobu	2014-05-19 08:35:04 +0900 (Mon, 19 May 2014)

  New Revision: 46009

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

  Log:
    test_etc.rb: omit unrunnable tests
    
    * test/etc/test_etc.rb (test_sysconf, test_confstr, test_pathconf):
      define test cases only if corresponding constants are available.

  Modified files:
    trunk/test/etc/test_etc.rb
Index: test/etc/test_etc.rb
===================================================================
--- test/etc/test_etc.rb	(revision 46008)
+++ test/etc/test_etc.rb	(revision 46009)
@@ -134,7 +134,7 @@ class TestEtc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/etc/test_etc.rb#L134
     rescue ArgumentError
     end
     assert_kind_of(Integer, Etc.sysconf(Etc::SC_CLK_TCK))
-  end
+  end if defined?(Etc::SC_CLK_TCK)
 
   def test_confstr
     begin
@@ -144,7 +144,7 @@ class TestEtc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/etc/test_etc.rb#L144
     rescue ArgumentError
     end
     assert_kind_of(String, Etc.confstr(Etc::CS_PATH))
-  end
+  end if defined?(Etc::CS_PATH)
 
   def test_pathconf
     begin
@@ -157,6 +157,6 @@ class TestEtc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/etc/test_etc.rb#L157
       val = w.pathconf(Etc::PC_PIPE_BUF)
       assert(val.nil? || val.kind_of?(Integer))
     }
-  end
+  end if defined?(Etc::PC_PIPE_BUF)
 
 end

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

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