summaryrefslogtreecommitdiff
path: root/test/mkmf/test_convertible.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-03 11:23:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-03 11:23:48 +0000
commit9e3e0ca3fe5dbfb611445f266f30f72bc06fe3de (patch)
tree400a45f54d2cb820174d382c49d0ce4f624d99e3 /test/mkmf/test_convertible.rb
parente33b7f338158ec83f4817bbb4c91248ed2b13b2d (diff)
* lib/mkmf.rb (convertible_int): define printf format prefix too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/mkmf/test_convertible.rb')
-rw-r--r--test/mkmf/test_convertible.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/mkmf/test_convertible.rb b/test/mkmf/test_convertible.rb
index e8cc280..82189ff 100644
--- a/test/mkmf/test_convertible.rb
+++ b/test/mkmf/test_convertible.rb
@@ -17,8 +17,14 @@ class TestMkmf
open("confdefs.h", "w") {|f|
f.puts "typedef #{signed}#{type} test1_t;"
}
+ $defs.clear
assert_equal((prefix || signed)+type,
mkmf {convertible_int("test1_t", "confdefs.h")})
+ (u = signed[/^u/]) and u.upcase!
+ assert_includes($defs, "-DTYPEOF_TEST1_T="+"#{prefix||signed}#{type}".quote)
+ assert_includes($defs, "-DPRI_TEST1T_PREFIX=PRI_#{type.upcase}_PREFIX")
+ assert_includes($defs, "-DTEST1T2NUM=#{u}#{type.upcase}2NUM")
+ assert_includes($defs, "-DNUM2TEST1T=NUM2#{u}#{type.upcase}")
end
end
end