mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #1787 from take-cheeze/bintest_improvement
`bintest` improvement.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
require 'tempfile'
|
||||
|
||||
assert('regression for #1564') do
|
||||
o = `bin/mruby -e '<<' 2>&1`
|
||||
assert_equal o, "-e:1:2: syntax error, unexpected tLSHFT\n"
|
||||
@@ -6,8 +8,9 @@ assert('regression for #1564') do
|
||||
end
|
||||
|
||||
assert('regression for #1572') do
|
||||
system "echo 'p \"ok\"' > /tmp/1572.rb"
|
||||
system "bin/mrbc -g -o /tmp/1572.mrb /tmp/1572.rb"
|
||||
o = `bin/mruby -b /tmp/1572.mrb`.strip
|
||||
script, bin = Tempfile.new('test.rb'), Tempfile.new('test.mrb')
|
||||
system "echo 'p \"ok\"' > #{script.path}"
|
||||
system "bin/mrbc -g -o #{bin.path} #{script.path}"
|
||||
o = `bin/mruby -b #{bin.path}`.strip
|
||||
assert_equal o, '"ok"'
|
||||
end
|
||||
|
||||
@@ -32,6 +32,7 @@ assert('success') do
|
||||
o = `bin/mruby-strip #{compiled1.path}`
|
||||
assert_equal 0, $?.exitstatus
|
||||
assert_equal "", o
|
||||
assert_equal `bin/mruby #{script_file.path}`, `bin/mruby -b #{compiled1.path}`
|
||||
|
||||
o = `bin/mruby-strip #{compiled1.path} #{compiled2.path}`
|
||||
assert_equal 0, $?.exitstatus
|
||||
|
||||
@@ -194,7 +194,8 @@ module MRuby
|
||||
end
|
||||
|
||||
def run_bintest
|
||||
sh "ruby test/bintest.rb"
|
||||
targets = @gems.select { |v| Dir.exists? "#{v.dir}/bintest" }.map { |v| filename v.dir }
|
||||
sh "ruby test/bintest.rb #{targets.join ' '}"
|
||||
end
|
||||
|
||||
def print_build_summary
|
||||
|
||||
+4
-2
@@ -1,8 +1,10 @@
|
||||
$:.unshift File.dirname(File.dirname(File.expand_path(__FILE__)))
|
||||
require 'test/assert.rb'
|
||||
|
||||
Dir['mrbgems/**/bintest/*.rb'].each do |file|
|
||||
load file
|
||||
ARGV.each do |gem|
|
||||
Dir["#{gem}/bintest/*.rb"].each do |file|
|
||||
load file
|
||||
end
|
||||
end
|
||||
|
||||
load 'test/report.rb'
|
||||
|
||||
Reference in New Issue
Block a user