From cb4133c8abc7f7d20d3046bd62f862aef216c5a9 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 13 May 2010 12:39:45 +0000 Subject: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io_m17n.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ruby/test_io_m17n.rb') diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 23d7e4f406..1016eaa4d2 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -1792,5 +1792,17 @@ EOT end end + def test_textmode_paragraph_binaryread + with_pipe("US-ASCII:UTF-8", :universal_newline => true) do |r, w| + r, w = IO.pipe + w << "a\n\n\ncdefgh".gsub(/\n/, "\r\n") + w.close + r.set_encoding("US-ASCII:UTF-8", :universal_newline => true) + assert_equal("a\n\n", r.gets("")) + assert_equal("c", r.getc) + assert_equal("defgh", r.readpartial(10)) + end + end + end -- cgit v1.2.3