diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-31 10:15:30 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-31 10:15:30 +0000 |
| commit | 940dff967a503c25b129d945f70092c26a764b22 (patch) | |
| tree | e59227d03896a08c50122efaa77336add08dce7c /test/ruby | |
| parent | 6fac84119def5a8e02d2ca892e004b9d5b96640e (diff) | |
| download | ruby-940dff967a503c25b129d945f70092c26a764b22.tar.gz ruby-940dff967a503c25b129d945f70092c26a764b22.tar.xz ruby-940dff967a503c25b129d945f70092c26a764b22.zip | |
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_io.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 708e25d76..0c1c6b2d2 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" |
