Merge pull request #6567 from dearblue/bintest2

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-07-05 18:16:58 +09:00
committed by GitHub
+5 -6
View File
@@ -3,14 +3,17 @@ require 'test/assert.rb'
GEMNAME = ""
def cmd_list(s)
def cmd_bin(s)
path = s == "mrbc" ? ENV['MRBCFILE'] : "#{ENV['BUILD_DIR']}/bin/#{s}"
path = path.sub(/\.exe\z/, "")
if /mswin(?!ce)|mingw|bccwin/ =~ RbConfig::CONFIG['host_os']
path = "#{path}.exe".tr("/", "\\")
end
path
end
path_list = [path]
def cmd_list(s)
path_list = [cmd_bin(s)]
emu = ENV['EMULATOR']
path_list.unshift emu if emu && !emu.empty?
@@ -22,10 +25,6 @@ def cmd(s)
cmd_list(s).join(' ')
end
def cmd_bin(s)
cmd_list(s).pop
end
def shellquote(s)
case RbConfig::CONFIG['host_os']
when /mswin(?!ce)|mingw|bccwin/