summaryrefslogtreecommitdiffhomepage
path: root/test/io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/io.rb')
-rw-r--r--test/io.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/io.rb b/test/io.rb
index f1dd7afe8..5a6dbf146 100644
--- a/test/io.rb
+++ b/test/io.rb
@@ -140,6 +140,13 @@ assert('IO#read', '15.2.20.5.14') do
end
end
+assert "IO#read(n) with n > IO::BUF_SIZE" do
+ r,w = IO.pipe
+ n = IO::BUF_SIZE+1
+ w.write 'a'*n
+ assert_equal r.read(n), 'a'*n
+end
+
assert('IO#readchar', '15.2.20.5.15') do
# almost same as IO#getc
IO.open(IO.sysopen($mrbtest_io_rfname)) do |io|