summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-11 07:52:25 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-11 07:52:25 +0000
commit9c4e7b66427cb41bd9d8ca291e7f7ae99530e069 (patch)
treea1b7424a84f09db22429a3b2334169d7ab0fcfa4
parent60d4ab9f83171c41a655157979e6d5a73ac8dae6 (diff)
downloadruby-9c4e7b66427cb41bd9d8ca291e7f7ae99530e069.tar.gz
ruby-9c4e7b66427cb41bd9d8ca291e7f7ae99530e069.tar.xz
ruby-9c4e7b66427cb41bd9d8ca291e7f7ae99530e069.zip
* test/ruby/test_file.rb (test_truncate_wbuf): we want to test
only File#truncate, not behaviour of seek(2). git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_file.rb6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c8a2910ae..3621d7311 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* dir.c (push_braces): was confusing VALUE and char*.
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index 4c30373bc..f86d92921 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -50,11 +50,11 @@ class TestFile < Test::Unit::TestCase
def test_truncate_wbuf # [ruby-dev:24191]
f = Tempfile.new("test-truncate")
- f.puts "abc"
+ f.print "abc"
f.truncate(0)
- f.puts "def"
+ f.print "def"
f.close
- assert_equal("\0\0\0\0def\n", File.read(f.path))
+ assert_equal("\0\0\0def", File.read(f.path))
end
def test_truncate_rbuf # [ruby-dev:24197]