summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-mruby
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-04 01:39:34 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-04 01:39:34 +0900
commite1b3cfa88e6043c6b9c21a944e40cc888f02bb0f (patch)
tree98cefa503d0886a16db8b456fedf5c3aa56b34f5 /mrbgems/mruby-bin-mruby
parent18f0fcb0c78b22543e60d866eefb8289015758b9 (diff)
parent0cc34d64a2d9a6ce33e8bc3e328c02fd788e96dd (diff)
downloadmruby-e1b3cfa88e6043c6b9c21a944e40cc888f02bb0f.tar.gz
mruby-e1b3cfa88e6043c6b9c21a944e40cc888f02bb0f.zip
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'mrbgems/mruby-bin-mruby')
-rw-r--r--mrbgems/mruby-bin-mruby/bintest/mruby.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/mrbgems/mruby-bin-mruby/bintest/mruby.rb b/mrbgems/mruby-bin-mruby/bintest/mruby.rb
index 2eb41d758..22872c389 100644
--- a/mrbgems/mruby-bin-mruby/bintest/mruby.rb
+++ b/mrbgems/mruby-bin-mruby/bintest/mruby.rb
@@ -1,3 +1,5 @@
+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