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 behavior of seek(2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f6f5301179
commit
0935d95369
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Nov 11 16:56:10 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/ruby/test_file.rb (test_truncate_wbuf): we want to test
|
||||||
|
only File#truncate, not behavior of seek(2).
|
||||||
|
|
||||||
Thu Nov 11 01:52:52 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Nov 11 01:52:52 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* error.c (syserr_initialize): use stringified object.
|
* error.c (syserr_initialize): use stringified object.
|
||||||
|
|
|
@ -228,11 +228,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]
|
||||||
|
|
Loading…
Reference in a new issue