Commit 24e3e33c authored by take_cheeze's avatar take_cheeze

use tempfile module

parent fa5c3d4f
require 'tempfile'
assert('regression for #1564') do assert('regression for #1564') do
o = `bin/mruby -e '<<' 2>&1` o = `bin/mruby -e '<<' 2>&1`
assert_equal o, "-e:1:2: syntax error, unexpected tLSHFT\n" assert_equal o, "-e:1:2: syntax error, unexpected tLSHFT\n"
...@@ -6,8 +8,9 @@ assert('regression for #1564') do ...@@ -6,8 +8,9 @@ assert('regression for #1564') do
end end
assert('regression for #1572') do assert('regression for #1572') do
system "echo 'p \"ok\"' > /tmp/1572.rb" script, bin = Tempfile.new('test.rb'), Tempfile.new('test.mrb')
system "bin/mrbc -g -o /tmp/1572.mrb /tmp/1572.rb" system "echo 'p \"ok\"' > #{script.path}"
o = `bin/mruby -b /tmp/1572.mrb`.strip system "bin/mrbc -g -o #{bin.path} #{script.path}"
o = `bin/mruby -b #{bin.path}`.strip
assert_equal o, '"ok"' assert_equal o, '"ok"'
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment