From 545d649eff73021d515f7a96841b363b0001e9d9 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Wed, 30 Sep 2015 15:42:27 +0900 Subject: fix tests on windows. 'bin/mruby' not work on windows. so correct command name and quoted arguments. --- mrbgems/mruby-bin-mruby/bintest/mruby.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'mrbgems/mruby-bin-mruby') diff --git a/mrbgems/mruby-bin-mruby/bintest/mruby.rb b/mrbgems/mruby-bin-mruby/bintest/mruby.rb index de211c1ba..01fc94632 100644 --- a/mrbgems/mruby-bin-mruby/bintest/mruby.rb +++ b/mrbgems/mruby-bin-mruby/bintest/mruby.rb @@ -1,17 +1,17 @@ require 'tempfile' assert('regression for #1564') do - o = `bin/mruby -e '<<' 2>&1` + o = `#{cmd('mruby')} -e #{shellquote('<<')} 2>&1` assert_equal o, "-e:1:2: syntax error, unexpected tLSHFT\n" - o = `bin/mruby -e '<<-' 2>&1` + o = `#{cmd('mruby')} -e #{shellquote('<<-')} 2>&1` assert_equal o, "-e:1:3: syntax error, unexpected tLSHFT\n" end assert('regression for #1572') do 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 + File.write script.path, 'p "ok"' + system "#{cmd('mrbc')} -g -o #{bin.path} #{script.path}" + o = `#{cmd('mruby')} -b #{bin.path}`.strip assert_equal o, '"ok"' end @@ -21,14 +21,14 @@ assert '$0 value' do # .rb script script.write "p $0\n" script.flush - assert_equal "\"#{script.path}\"", `./bin/mruby "#{script.path}"`.chomp + assert_equal "\"#{script.path}\"", `#{cmd('mruby')} "#{script.path}"`.chomp # .mrb file - `./bin/mrbc -o "#{bin.path}" "#{script.path}"` - assert_equal "\"#{bin.path}\"", `./bin/mruby -b "#{bin.path}"`.chomp + `#{cmd('mrbc')} -o "#{bin.path}" "#{script.path}"` + assert_equal "\"#{bin.path}\"", `#{cmd('mruby')} -b "#{bin.path}"`.chomp # one liner - assert_equal '"-e"', `./bin/mruby -e 'p $0'`.chomp + assert_equal '"-e"', `#{cmd('mruby')} -e #{shellquote('p $0')}`.chomp end assert '__END__', '8.6' do @@ -42,5 +42,5 @@ __END__ p 'legend' EOS script.flush - assert_equal "\"test\"\n\"fin\"\n", `./bin/mruby #{script.path}` + assert_equal "\"test\"\n\"fin\"\n", `#{cmd('mruby')} #{script.path}` end -- cgit v1.2.3