ruby-changes:10374
From: akr <ko1@a...>
Date: Sat, 31 Jan 2009 19:15:35 +0900 (JST)
Subject: [ruby-changes:10374] Ruby:r21918 (trunk): add a test.
akr 2009-01-31 19:15:30 +0900 (Sat, 31 Jan 2009) New Revision: 21918 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21918 Log: add a test. Modified files: trunk/test/ruby/test_io.rb Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 21917) +++ test/ruby/test_io.rb (revision 21918) @@ -812,6 +812,17 @@ 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" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/