[rubygems/rubygems] Check if failed with the expected error

https://github.com/rubygems/rubygems/commit/3f22e9df8d
This commit is contained in:
Nobuyoshi Nakada 2024-06-20 11:33:06 +09:00 коммит произвёл git
Родитель e345970707
Коммит 92ab2dac22
1 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -333,9 +333,15 @@ install:
f.puts "RbConfig::CONFIG['platform'] = 'fake_platform'"
end
stdout, stderr = capture_subprocess_io do
system(Gem.ruby, "-rmkmf", "-e", "exit MakeMakefile::RbConfig::CONFIG['host_os'] == 'fake_os'",
"--", "--target-rbconfig=#{fake_rbconfig}")
pend "This version of mkmf does not support --target-rbconfig" unless $?.success?
end
unless $?.success?
assert_include(stderr, "uninitialized constant MakeMakefile::RbConfig")
pend "This version of mkmf does not support --target-rbconfig"
end
assert_empty(stdout)
@spec.extensions << "extconf.rb"
@builder = Gem::Ext::Builder.new @spec, "", Gem::TargetRbConfig.from_path(fake_rbconfig)