1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-01-31 10:15:30 +00:00
parent fa4f685ef7
commit b9faa6b74c

View file

@ -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"