diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-06 00:18:16 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-06 00:18:16 +0000 |
commit | 5d0fb7c155f446fd76bf7ccc5aa17c47729f5f2e (patch) | |
tree | de8cbc588a0cb4730a19832cf36d7dec196de673 /test/mkmf | |
parent | 56317927278dffa906092fccd1093786a9380484 (diff) | |
download | ruby-5d0fb7c155f446fd76bf7ccc5aa17c47729f5f2e.tar.gz |
* lib/mkmf.rb (configuration): fixing gsub when multiple error flags
are passed to GCC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/mkmf')
-rw-r--r-- | test/mkmf/test_find_executable.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/mkmf/test_find_executable.rb b/test/mkmf/test_find_executable.rb index 5ccec880fd..132330bf7c 100644 --- a/test/mkmf/test_find_executable.rb +++ b/test/mkmf/test_find_executable.rb @@ -2,6 +2,22 @@ require_relative 'base' class TestMkmf class TestFindExecutable < TestMkmf + def test_valid_warnflags + val = $extmk + begin + makefile = mkmf do + $extmk = false + self.class::CONFIG['warnflags'] = "-Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32" + self.class::CONFIG['GCC'] = 'yes' + configuration '.' + end + generated_flags = makefile.grep(/warnflags/).first[/^warnflags = .*$/] + assert_equal "warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32", generated_flags + ensure + $extmk = val + end + end + def test_find_executable bug2669 = '[ruby-core:27912]' path, ENV["PATH"] = ENV["PATH"], path |