Merge pull request #4318 from shuujii/set-GEMNAME-on-bintest

Set `GEMNAME` on bintest
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-03-08 12:22:24 +09:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
+1 -3
View File
@@ -22,9 +22,7 @@ def assertion_string(err, str, iso=nil, e=nil, bt=nil)
msg = "#{err}#{str}"
msg += " [#{iso}]" if iso && !iso.empty?
msg += " => #{e}" if e && !e.to_s.empty?
if Object.const_defined?(:GEMNAME)
msg += " (#{GEMNAME == 'mruby-test' ? 'core' : "mrbgems: #{GEMNAME}"})"
end
msg += " (#{GEMNAME == 'mruby-test' ? 'core' : "mrbgems: #{GEMNAME}"})"
if $mrbtest_assert && $mrbtest_assert.size > 0
$mrbtest_assert.each do |idx, assert_msg, diff|
msg += "\n - Assertion[#{idx}] Failed: #{assert_msg}\n#{diff}"
+3
View File
@@ -1,6 +1,8 @@
$:.unshift File.dirname(File.dirname(File.expand_path(__FILE__)))
require 'test/assert.rb'
GEMNAME = ""
def cmd(s)
case RbConfig::CONFIG['host_os']
when /mswin(?!ce)|mingw|bccwin/
@@ -30,6 +32,7 @@ ARGV.each do |gem|
end
Dir["#{gem}/bintest/**/*.rb"].each do |file|
GEMNAME.replace(File.basename(gem))
load file
end
end