ruby-changes:21600
From: usa <ko1@a...>
Date: Mon, 7 Nov 2011 19:27:30 +0900 (JST)
Subject: [ruby-changes:21600] usa:r33649 (trunk): * test/ruby/test_io_m17n.rb
usa 2011-11-07 19:27:19 +0900 (Mon, 07 Nov 2011) New Revision: 33649 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33649 Log: * test/ruby/test_io_m17n.rb (TestIO_M17N#test_default_stdout_stderr_mode): new test for r33627-33629. see [backport #5565] Modified files: trunk/ChangeLog trunk/test/ruby/test_io_m17n.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 33648) +++ ChangeLog (revision 33649) @@ -1,3 +1,9 @@ +Mon Nov 7 19:25:16 2011 NAKAMURA Usaku <usa@r...> + + * 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@g...> * lib/debug.rb: add help for 'pp' and 'r[estart]'. patch Index: test/ruby/test_io_m17n.rb =================================================================== --- test/ruby/test_io_m17n.rb (revision 33648) +++ test/ruby/test_io_m17n.rb (revision 33649) @@ -2097,4 +2097,24 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/