aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-06 04:52:31 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-06 04:52:31 +0000
commite796e95ec84b85c4885a15b6b6b46c6689d31444 (patch)
tree2ff0c81fd3c0f6fc100f183badfec129c0e80c39 /test/ruby/test_io.rb
parent127cfd117400b84ff5ab9102f6c9a57895c375b5 (diff)
downloadruby-e796e95ec84b85c4885a15b6b6b46c6689d31444.tar.gz
* io.c (rb_io_s_write, rb_io_s_binwrite): delete File#write and
#binwrite. It may take a long time to make them stable, so 1.9.2 should not include them. We need refactoring to implement them again. * test/ruby/test_io.rb: delete tests for them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index cab270d447..5fc3b133dd 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1512,34 +1512,4 @@ End
t.close
assert_raise(IOError) {t.binmode}
end
-
- def test_s_write
- t = Tempfile.new("foo")
- path = t.path
- t.close(false)
- File.write(path, "foo\nbar\nbaz")
- assert_equal("foo\nbar\nbaz", File.read(path))
- File.write(path, "FOO", 0)
- assert_equal("FOO\nbar\nbaz", File.read(path))
- File.write(path, "BAR")
- assert_equal("BAR", File.read(path))
- File.write(path, "\u{3042}", mode: "w", encoding: "EUC-JP")
- assert_equal("\u{3042}".encode("EUC-JP"), File.read(path, encoding: "EUC-JP"))
- t.unlink
- end
-
- def test_s_binwrite
- t = Tempfile.new("foo")
- path = t.path
- t.close(false)
- File.binwrite(path, "foo\nbar\nbaz")
- assert_equal("foo\nbar\nbaz", File.read(path))
- File.binwrite(path, "FOO", 0)
- assert_equal("FOO\nbar\nbaz", File.read(path))
- File.binwrite(path, "BAR")
- assert_equal("BAR", File.read(path))
- File.binwrite(path, "\u{3042}")
- assert_equal("\u{3042}", File.read(path))
- t.unlink
- end
end