зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
924af0cc95
Коммит
6ff56256c3
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче