summaryrefslogtreecommitdiffhomepage
path: root/bintest/mrbc.rb
blob: b016378a164510ca9a1ac1132304e22fbee98b22 (plain)
1
2
3
4
5
6
7
8
9
10
11
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