aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_ext_ext_conf_builder.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 06:52:18 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 06:52:18 +0000
commit9694bb8cac12969300692dac5a1cf7aa4e3a46cd (patch)
treec3cb423d701f7049ba9382de052e2a937cd1302d /test/rubygems/test_gem_ext_ext_conf_builder.rb
parent3f606b7063fc7a8b191556365ad343a314719a8d (diff)
downloadruby-9694bb8cac12969300692dac5a1cf7aa4e3a46cd.tar.gz
* lib/rubygems*: Updated to RubyGems 2.0
* test/rubygems*: ditto. * common.mk (prelude): Updated for RubyGems 2.0 source rearrangement. * tool/change_maker.rb: Allow invalid UTF-8 characters in source files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_ext_ext_conf_builder.rb')
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb
index c050d82f9c..2d20fed874 100644
--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb
+++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb
@@ -1,3 +1,5 @@
+# coding: UTF-8
+
require 'rubygems/test_case'
require 'rubygems/ext'
@@ -119,6 +121,7 @@ checking for main\(\) in .*?nonexistent/m, error.message)
output = []
makefile_path = File.join(@ext, 'Makefile')
File.open makefile_path, 'w' do |makefile|
+ makefile.puts "# π"
makefile.puts "RUBYARCHDIR = $(foo)$(target_prefix)"
makefile.puts "RUBYLIBDIR = $(bar)$(target_prefix)"
makefile.puts "all:"
@@ -132,14 +135,10 @@ checking for main\(\) in .*?nonexistent/m, error.message)
assert_equal make_command, output[0]
assert_equal "#{make_command} install", output[2]
- edited_makefile = <<-EOF
-RUBYARCHDIR = #{@ext}$(target_prefix)
-RUBYLIBDIR = #{@ext}$(target_prefix)
-all:
-install:
- EOF
+ edited_makefile = Gem.read_binary makefile_path
- assert_equal edited_makefile, File.read(makefile_path)
+ assert_match "\nRUBYARCHDIR = #{@ext}$(target_prefix)\n", edited_makefile
+ assert_match "\nRUBYLIBDIR = #{@ext}$(target_prefix)\n", edited_makefile
end
def test_class_make_no_Makefile