Add bintest for mrbc.

This commit is contained in:
take_cheeze
2014-06-06 21:46:58 +09:00
parent 7f870f601f
commit 39bbdd5f2f
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
require 'tempfile'
assert('Compiling multiple files without new line in last line. #2361') do
a, b, out = Tempfile.new('a.rb'), Tempfile.new('b.rb'), Tempfile.new('out.mrb')
a.write('module A; end')
a.flush
b.write('module B; end')
b.flush
result = `bin/mrbc -c -o #{out.path} #{a.path} #{b.path} 2>&1`
assert_equal "bin/mrbc:#{a.path}:Syntax OK", result.chomp
assert_equal 0, $?.exitstatus
end
+1
View File
@@ -209,6 +209,7 @@ module MRuby
def run_bintest
targets = @gems.select { |v| File.directory? "#{v.dir}/bintest" }.map { |v| filename v.dir }
targets << filename(".") if File.directory? "./bintest"
sh "ruby test/bintest.rb #{targets.join ' '}"
end