From 21963f8fa1b3ac5c1896fcc13157fdc70b4d9349 Mon Sep 17 00:00:00 2001 From: Tomoyuki Sahara Date: Tue, 20 Oct 2015 15:37:05 +0900 Subject: UT for IO#sysseek. --- test/io.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/io.rb b/test/io.rb index a9bdc3e4f..434607959 100644 --- a/test/io.rb +++ b/test/io.rb @@ -426,6 +426,14 @@ assert('IO#close_on_exec') do # end end +assert('IO#sysseek') do + IO.open(IO.sysopen($mrbtest_io_rfname)) do |io| + assert_equal 2, io.sysseek(2) + assert_equal 5, io.sysseek(3, IO::SEEK_CUR) # 2 + 3 => 5 + assert_equal $mrbtest_io_msg.size - 4, io.sysseek(-4, IO::SEEK_END) + end +end + assert('`cmd`') do assert_equal `echo foo`, "foo\n" end -- cgit v1.2.3