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

* test/ruby/test_file.rb (test_truncate_wbuf): we want to test

only File#truncate, not behaviour of seek(2).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2004-11-11 07:52:25 +00:00
parent 98101c1f96
commit 66d927e308
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Thu Nov 11 16:47:21 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_file.rb (test_truncate_wbuf): we want to test
only File#truncate, not behaviour of seek(2).
Thu Nov 11 09:41:01 2004 Yukihiro Matsumoto <matz@ruby-lang.org> Thu Nov 11 09:41:01 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* dir.c (push_braces): was confusing VALUE and char*. * dir.c (push_braces): was confusing VALUE and char*.

View file

@ -50,11 +50,11 @@ class TestFile < Test::Unit::TestCase
def test_truncate_wbuf # [ruby-dev:24191] def test_truncate_wbuf # [ruby-dev:24191]
f = Tempfile.new("test-truncate") f = Tempfile.new("test-truncate")
f.puts "abc" f.print "abc"
f.truncate(0) f.truncate(0)
f.puts "def" f.print "def"
f.close f.close
assert_equal("\0\0\0\0def\n", File.read(f.path)) assert_equal("\0\0\0def", File.read(f.path))
end end
def test_truncate_rbuf # [ruby-dev:24197] def test_truncate_rbuf # [ruby-dev:24197]