summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorChristopher Aue <[email protected]>2017-06-13 21:40:36 +0200
committerChristopher Aue <[email protected]>2017-06-13 21:40:36 +0200
commit3642fe40131220520e961157fa501ee1adf2ebca (patch)
tree29ca5c04ea47dbb9d9a777294fbfe417182f4cbe /test
parentfe99819bc996891ea97c10446ca3e495c77d790f (diff)
downloadmruby-3642fe40131220520e961157fa501ee1adf2ebca.tar.gz
mruby-3642fe40131220520e961157fa501ee1adf2ebca.zip
fixed #87: IO#read(n) with n > IO::BUF_SIZE
Diffstat (limited to 'test')
-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|