diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/bintest.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/bintest.rb b/test/bintest.rb index a6888c9fb..773d61edc 100644 --- a/test/bintest.rb +++ b/test/bintest.rb @@ -3,13 +3,27 @@ require 'test/assert.rb' GEMNAME = "" -def cmd(s) +def cmd_list(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 + + path_list = [path] + + emu = ENV['EMULATOR'] + path_list.unshift emu if emu && !emu.empty? + + path_list +end + +def cmd(s) + return cmd_list(s).join(' ') +end + +def cmd_bin(s) + return cmd_list(s).pop end def shellquote(s) |
