1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_io_m17n.rb

(TestIO_M17N#test_default_stdout_stderr_mode): new test for
  r33627-33629.  see [backport #5565]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2011-11-07 10:27:19 +00:00
parent 2522df9655
commit 8c492668a7
2 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Mon Nov 7 19:25:16 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_io_m17n.rb
(TestIO_M17N#test_default_stdout_stderr_mode): new test for
r33627-33629. see [backport #5565]
Mon Nov 07 01:14:22 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
* lib/debug.rb: add help for 'pp' and 'r[estart]'. patch

View file

@ -2097,4 +2097,24 @@ EOT
assert_equal("\r\n", open("a", "rb"){|f| f.read})
}
end
def test_default_stdout_stderr_mode
with_pipe do |in_r, in_w|
with_pipe do |out_r, out_w|
pid = Process.spawn({}, EnvUtil.rubybin, in: in_r, out: out_w, err: out_w)
in_r.close
out_w.close
in_w.write <<-EOS
STDOUT.puts "abc"
STDOUT.flush
STDERR.puts "def"
STDERR.flush
EOS
in_w.close
Process.wait pid
assert_equal "abc\r\ndef\r\n", out_r.binmode.read
out_r.close
end
end
end if /mswin|mingw/ =~ RUBY_PLATFORM
end