aboutsummaryrefslogtreecommitdiffstats
path: root/test/mkmf/base.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-10 09:12:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-10 09:12:33 +0000
commit61d197a62da53b11518f40a1dfb793f8ef85d89b (patch)
treeea686fa30fdfd9f8a68b7b1ba7c969d4c6468dfd /test/mkmf/base.rb
parent30e0f51a5df6a207ebeec105317cbb4cb5566be6 (diff)
downloadruby-61d197a62da53b11518f40a1dfb793f8ef85d89b.tar.gz
* test/mkmf/base.rb (TestMkmf#config_value): extract macro value from
config.h. * test/mkmf/test_sizeof.rb (TestMkmf::TestSizeof#test_sizeof_builtin), (TestMkmf::TestSizeof#test_sizeof_struct): more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/mkmf/base.rb')
-rw-r--r--test/mkmf/base.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/mkmf/base.rb b/test/mkmf/base.rb
index f82952d0c5..49553cf10f 100644
--- a/test/mkmf/base.rb
+++ b/test/mkmf/base.rb
@@ -39,4 +39,12 @@ class TestMkmf < Test::Unit::TestCase
def mkmf(*args, &block)
@mkmfobj.instance_eval(*args, &block)
end
+
+ def config_value(name)
+ create_tmpsrc("---config-value=#{name}")
+ xpopen(cpp_command('')) do |f|
+ f.grep(/^---config-value=(.*)/) {return $1}
+ end
+ nil
+ end
end