diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-18 23:35:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-18 23:35:04 +0000 |
commit | 6ff56256c3c4ff4c9628ddc2a7deac6634efbc79 (patch) | |
tree | fbd7ca77af879f31d071b5d3a49355dccc8e9954 /test | |
parent | 924af0cc95214fae358759d27c69028d89e0fb8e (diff) | |
download | ruby-6ff56256c3c4ff4c9628ddc2a7deac6634efbc79.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/etc/test_etc.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 |