From 6ff56256c3c4ff4c9628ddc2a7deac6634efbc79 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 18 May 2014 23:35:04 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/etc/test_etc.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/etc') diff --git a/test/etc/test_etc.rb b/test/etc/test_etc.rb index adf0b364b3..4a099e7df5 100644 --- a/test/etc/test_etc.rb +++ b/test/etc/test_etc.rb @@ -134,7 +134,7 @@ class TestEtc < Test::Unit::TestCase 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 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 val = w.pathconf(Etc::PC_PIPE_BUF) assert(val.nil? || val.kind_of?(Integer)) } - end + end if defined?(Etc::PC_PIPE_BUF) end -- cgit v1.2.3