aboutsummaryrefslogtreecommitdiffstats
path: root/test/mkmf/base.rb
diff options
context:
space:
mode:
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