aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_io_m17n.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-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