summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-13 12:39:45 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-13 12:39:45 +0000
commitcb4133c8abc7f7d20d3046bd62f862aef216c5a9 (patch)
treecbab9174e2f7de3af88f5423e4542b27b3e64d8b /test
parentfa086089fb591705f080eaf7a6021012dd3c6efc (diff)
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27787 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