diff options
| author | Yasuhiro Matsumoto <[email protected]> | 2015-09-30 15:42:27 +0900 |
|---|---|---|
| committer | Yasuhiro Matsumoto <[email protected]> | 2015-09-30 16:13:02 +0900 |
| commit | 545d649eff73021d515f7a96841b363b0001e9d9 (patch) | |
| tree | e7010366188052a89cc659426fc4bbf55367f7a8 /mrbgems/mruby-bin-mruby | |
| parent | 81ec5f5dc04a45d869ebf393d818cb8d08e0ffbf (diff) | |
| download | mruby-545d649eff73021d515f7a96841b363b0001e9d9.tar.gz mruby-545d649eff73021d515f7a96841b363b0001e9d9.zip | |
fix tests on windows.
'bin/mruby' not work on windows. so correct command name and quoted arguments.
Diffstat (limited to 'mrbgems/mruby-bin-mruby')
| -rw-r--r-- | mrbgems/mruby-bin-mruby/bintest/mruby.rb | 20 |
1 files changed, 10 insertions, 10 deletions
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 |
