summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-31 10:15:30 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-31 10:15:30 +0000
commitb9faa6b74ca443157ed93172bd3cd7bb44141ba5 (patch)
treee59227d03896a08c50122efaa77336add08dce7c /test
parentfa4f685ef7094810c2b3b71dbb8f4de42fbfc5ea (diff)
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 708e25d766..0c1c6b2d2b 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -812,6 +812,17 @@ class TestIO < Test::Unit::TestCase
end
end
+ def test_readpartial_pos
+ mkcdtmpdir {
+ open("foo", "w") {|f| f << "abc" }
+ open("foo") {|f|
+ f.seek(0)
+ assert_equal("ab", f.readpartial(2))
+ assert_equal(2, f.pos)
+ }
+ }
+ end
+
def test_read
pipe(proc do |w|
w.write "foobarbaz"