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:
parent
fa4f685ef7
commit
b9faa6b74c
1 changed files with 11 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue