source: EcnlProtoTool/trunk/mruby-2.1.1/test/bintest.rb@ 439

Last change on this file since 439 was 439, checked in by coas-nagasima, 4 years ago

mrubyを2.1.1に更新

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-ruby;charset=UTF-8
File size: 719 bytes
Line 
1$:.unshift File.dirname(File.dirname(File.expand_path(__FILE__)))
2require 'test/assert.rb'
3
4GEMNAME = ""
5
6def cmd(s)
7 case RbConfig::CONFIG['host_os']
8 when /mswin(?!ce)|mingw|bccwin/
9 "bin\\#{s}.exe"
10 else
11 "bin/#{s}"
12 end
13end
14
15def shellquote(s)
16 case RbConfig::CONFIG['host_os']
17 when /mswin(?!ce)|mingw|bccwin/
18 "\"#{s}\""
19 else
20 "'#{s}'"
21 end
22end
23
24print "bintest - Command Binary Test\n\n"
25
26ARGV.each do |gem|
27 case gem
28 when '-v'; $mrbtest_verbose = true
29 end
30
31 case RbConfig::CONFIG['host_os']
32 when /mswin(?!ce)|mingw|bccwin/
33 gem = gem.gsub('\\', '/')
34 end
35
36 Dir["#{gem}/bintest/**/*.rb"].each do |file|
37 GEMNAME.replace(File.basename(gem))
38 load file
39 end
40end
41
42exit report
Note: See TracBrowser for help on using the repository browser.