From 2d646a13f714172356fe27183516e26ceac11adc Mon Sep 17 00:00:00 2001 From: fleuria Date: Sat, 16 Nov 2013 14:32:43 +0800 Subject: add regression for #1564 --- mrbgems/mruby-bin-mruby/bintest/mruby.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 mrbgems/mruby-bin-mruby/bintest/mruby.rb (limited to 'mrbgems/mruby-bin-mruby') diff --git a/mrbgems/mruby-bin-mruby/bintest/mruby.rb b/mrbgems/mruby-bin-mruby/bintest/mruby.rb new file mode 100644 index 000000000..46372d1d2 --- /dev/null +++ b/mrbgems/mruby-bin-mruby/bintest/mruby.rb @@ -0,0 +1,6 @@ +assert('regression for #1564') do + o = `bin/mruby -e '<<' 2>&1` + assert_equal o, "-e:1:2: syntax error, unexpected tLSHFT\n" + o = `bin/mruby -e '<<-' 2>&1` + assert_equal o, "-e:1:3: syntax error, unexpected tLSHFT\n" +end -- cgit v1.2.3 From 995e0f89cfd5d256c918031207097d2c6c0023c4 Mon Sep 17 00:00:00 2001 From: fleuria Date: Sat, 16 Nov 2013 14:41:33 +0800 Subject: add regression for #1572 --- build_config.rb | 1 + mrbgems/mruby-bin-mruby/bintest/mruby.rb | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'mrbgems/mruby-bin-mruby') diff --git a/build_config.rb b/build_config.rb index fce424686..58b1f1e24 100644 --- a/build_config.rb +++ b/build_config.rb @@ -70,6 +70,7 @@ MRuby::Build.new do |conf| # file separetor # conf.file_separator = '/' + conf.enable_bintest = true end # Define cross build settings diff --git a/mrbgems/mruby-bin-mruby/bintest/mruby.rb b/mrbgems/mruby-bin-mruby/bintest/mruby.rb index 46372d1d2..2eb41d758 100644 --- a/mrbgems/mruby-bin-mruby/bintest/mruby.rb +++ b/mrbgems/mruby-bin-mruby/bintest/mruby.rb @@ -4,3 +4,10 @@ assert('regression for #1564') do o = `bin/mruby -e '<<-' 2>&1` assert_equal o, "-e:1:3: syntax error, unexpected tLSHFT\n" 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 + assert_equal o, '"ok"' +end -- cgit v1.2.3