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

add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-05-13 12:39:45 +00:00
parent fa086089fb
commit cb4133c8ab

View file

@ -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