diff options
| author | take_cheeze <[email protected]> | 2014-06-06 21:46:58 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-06-06 21:46:58 +0900 |
| commit | 39bbdd5f2fa9f429b94bab759fa2da4524b52708 (patch) | |
| tree | 5240e445eaece09ee887f25c6e42937cc35add37 | |
| parent | 7f870f601f6ab7de39277514b2581fb58d87aab0 (diff) | |
| download | mruby-39bbdd5f2fa9f429b94bab759fa2da4524b52708.tar.gz mruby-39bbdd5f2fa9f429b94bab759fa2da4524b52708.zip | |
Add bintest for `mrbc`.
| -rw-r--r-- | bintest/mrbc.rb | 12 | ||||
| -rw-r--r-- | tasks/mruby_build.rake | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/bintest/mrbc.rb b/bintest/mrbc.rb new file mode 100644 index 000000000..b016378a1 --- /dev/null +++ b/bintest/mrbc.rb @@ -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 diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake index 966c602a4..09175d533 100644 --- a/tasks/mruby_build.rake +++ b/tasks/mruby_build.rake @@ -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 |
