summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-16 12:15:53 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-16 12:15:53 +0000
commit28b215880de82ee82061b3cd244bf3e47058ed53 (patch)
tree85bcede4349f64facc2645f6b1a0a4b8a4b7225d /test
parent76bd722eaba0fe00734f5a95860aaa73b6ae21ba (diff)
merges r27787 from trunk into ruby_1_9_2.
-- add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io_m17n.rb12
1 files changed, 12 insertions, 0 deletions
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