diff options
| author | Shouji Kuboyama <[email protected]> | 2019-04-15 17:16:08 +0900 |
|---|---|---|
| committer | Shouji Kuboyama <[email protected]> | 2019-04-15 17:16:08 +0900 |
| commit | 164985881b6d7d96218ec5cd986ca1bb4c919698 (patch) | |
| tree | cfbecc9118be65ff8a82465b9428d41532329c83 | |
| parent | 9c252410cf6e43eb7e19683844c83581445fc089 (diff) | |
| download | mruby-164985881b6d7d96218ec5cd986ca1bb4c919698.tar.gz mruby-164985881b6d7d96218ec5cd986ca1bb4c919698.zip | |
Fix test, popen and cmd in mruby-io
| -rw-r--r-- | mrbgems/mruby-io/test/io.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-io/test/io.rb b/mrbgems/mruby-io/test/io.rb index 85852c179..44eaca6be 100644 --- a/mrbgems/mruby-io/test/io.rb +++ b/mrbgems/mruby-io/test/io.rb @@ -3,7 +3,7 @@ assert('IO TEST SETUP') do MRubyIOTestUtil.io_test_setup - $cr = MRubyIOTestUtil.win? ? 1 : 0 # "\n" include CR or not + $cr, $crlf, $cmd = MRubyIOTestUtil.win? ? [1, "\r\n", "cmd /c "] : [0, "\n", ""] end assert('IO', '15.2.20') do @@ -419,7 +419,7 @@ end assert('IO.popen') do begin $? = nil - io = IO.popen("echo mruby-io") + io = IO.popen("#{$cmd}echo mruby-io") assert_true io.close_on_exec? assert_equal Fixnum, io.pid.class @@ -598,7 +598,7 @@ end assert('`cmd`') do begin - assert_equal `echo foo`, "foo\n" + assert_equal `#{$cmd}echo foo`, "foo#{$crlf}" rescue NotImplementedError => e skip e.message end |
