summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-04-16 17:34:50 +0900
committerGitHub <[email protected]>2019-04-16 17:34:50 +0900
commit3760f58d539c95ede7b3d21b8cc24606fde38204 (patch)
tree2bc17e536d396f7d20b8c9de4ce39c4f284d9256
parent4e3e4260c3860e4c0c274f520744bdb7629ea9cd (diff)
parentcdfeb53887d886adc10848e4a6e76c81fbd2a4c4 (diff)
downloadmruby-3760f58d539c95ede7b3d21b8cc24606fde38204.tar.gz
mruby-3760f58d539c95ede7b3d21b8cc24606fde38204.zip
Merge pull request #4383 from Shokuji/fix_mruby-io_test
Fix test in mruby-io
-rw-r--r--mrbgems/mruby-io/test/io.rb6
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