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:
parent
fa4f685ef7
commit
b9faa6b74c
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user