Commit 0cc34d64 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1787 from take-cheeze/bintest_improvement

`bintest` improvement.
parents 369c6c36 24e3e33c
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
......
$:.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'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment