summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authortakahashim <[email protected]>2015-09-27 21:25:06 +0900
committertakahashim <[email protected]>2015-09-27 21:25:06 +0900
commit9bbfc38bb4ee3a5f66f82a68542518f397bb9897 (patch)
treec62859b02422d5477bd54b1f0daeaed649b352ee /test
parent1d6b7f9bba247bef1da615d1c9f8d0bcc17456ea (diff)
downloadmruby-9bbfc38bb4ee3a5f66f82a68542518f397bb9897.tar.gz
mruby-9bbfc38bb4ee3a5f66f82a68542518f397bb9897.zip
add IO#rewind
Diffstat (limited to 'test')
-rw-r--r--test/io.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/io.rb b/test/io.rb
index a5ce7e049..a9bdc3e4f 100644
--- a/test/io.rb
+++ b/test/io.rb
@@ -256,6 +256,17 @@ assert('IO#pos=, IO#seek') do
io.closed?
end
+assert('IO#rewind') do
+ fd = IO.sysopen $mrbtest_io_rfname
+ io = IO.new fd
+ assert_equal 'm', io.getc
+ assert_equal 1, io.pos
+ assert_equal 0, io.rewind
+ assert_equal 0, io.pos
+ io.close
+ io.closed?
+end
+
assert('IO#gets') do
fd = IO.sysopen $mrbtest_io_rfname
io = IO.new fd