diff options
Diffstat (limited to 'test/rubygems/test_gem_ext_builder.rb')
-rw-r--r-- | test/rubygems/test_gem_ext_builder.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb index 0fe650b8a5..6bebfa7a03 100644 --- a/test/rubygems/test_gem_ext_builder.rb +++ b/test/rubygems/test_gem_ext_builder.rb @@ -14,6 +14,7 @@ class TestGemExtBuilder < Gem::TestCase FileUtils.mkdir_p @dest_path @orig_DESTDIR = ENV['DESTDIR'] + @orig_make = ENV['make'] @spec = util_spec 'a' @@ -22,6 +23,7 @@ class TestGemExtBuilder < Gem::TestCase def teardown ENV['DESTDIR'] = @orig_DESTDIR + ENV['make'] = @orig_make super end @@ -81,6 +83,28 @@ install: assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} install$}, results end + def test_custom_make_with_options + ENV['make'] = 'make V=1' + results = [] + File.open File.join(@ext, 'Makefile'), 'w' do |io| + io.puts <<-MAKEFILE +all: +\t@#{Gem.ruby} -e "puts 'all: OK'" + +clean: +\t@#{Gem.ruby} -e "puts 'clean: OK'" + +install: +\t@#{Gem.ruby} -e "puts 'install: OK'" + MAKEFILE + end + Gem::Ext::Builder.make @dest_path, results, @ext + results = results.join("\n").b + assert_match %r{clean: OK}, results + assert_match %r{all: OK}, results + assert_match %r{install: OK}, results + end + def test_build_extensions @spec.extensions << 'ext/extconf.rb' |