summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/bintest/mrbc.rb
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2015-04-06 15:20:13 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-06-01 21:53:55 +0900
commit6460ef77bcceb17d80d1b46a07b28fada19737c8 (patch)
tree802d327b0efbe1ed9ed1a1109657e23705b4f89f /mrbgems/mruby-compiler/bintest/mrbc.rb
parent214bc3c95a9e01a7be4d76e94d80be9d9d59bd4b (diff)
downloadmruby-6460ef77bcceb17d80d1b46a07b28fada19737c8.tar.gz
mruby-6460ef77bcceb17d80d1b46a07b28fada19737c8.zip
Compile mruby compiler as mrbgem.
Compiler codes is moved to "mruby-compiler". Executable `mrbc` is moved to "mruby-bin-mrbc".
Diffstat (limited to 'mrbgems/mruby-compiler/bintest/mrbc.rb')
-rw-r--r--mrbgems/mruby-compiler/bintest/mrbc.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/bintest/mrbc.rb b/mrbgems/mruby-compiler/bintest/mrbc.rb
new file mode 100644
index 000000000..b016378a1
--- /dev/null
+++ b/mrbgems/mruby-compiler/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