mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
8500714adc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
22 lines
669 B
Ruby
22 lines
669 B
Ruby
require File.expand_path('../../../spec_helper', __FILE__)
|
|
require 'etc'
|
|
|
|
platform_is_not :windows do
|
|
describe "Etc.sysconf" do
|
|
%w[
|
|
SC_ARG_MAX SC_CHILD_MAX SC_HOST_NAME_MAX SC_LOGIN_NAME_MAX SC_NGROUPS_MAX
|
|
SC_CLK_TCK SC_OPEN_MAX SC_PAGESIZE SC_RE_DUP_MAX SC_STREAM_MAX
|
|
SC_SYMLOOP_MAX SC_TTY_NAME_MAX SC_TZNAME_MAX SC_VERSION
|
|
].each do |const|
|
|
it "returns the value of POSIX.1 system configuration variable #{const}" do
|
|
var = Etc.const_get(const)
|
|
value = Etc.sysconf(var)
|
|
if value.nil?
|
|
value.should == nil
|
|
else
|
|
value.should be_kind_of(Integer)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|