diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-01 01:22:58 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-01 01:22:58 +0000 |
commit | 9cdc7f9db0ed33bc1ab3aafe299c9403190dda18 (patch) | |
tree | fbb115e3045553efc6d3c163214fd0446a0eed3f /test | |
parent | d163179c3e442557537ab6f24357a15af225dc4a (diff) | |
download | ruby-9cdc7f9db0ed33bc1ab3aafe299c9403190dda18.tar.gz |
* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
committed in r33144. I'd misunderstood the spec of ruby's universal
newline.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io_m17n.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 01dca47f7f..f62ded90cb 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -2072,29 +2072,29 @@ EOT def test_default_mode_on_dosish with_tmpdir { - open("a", "w") {|f| f.puts} + open("a", "w") {|f| f.write "\n"} assert_equal("\r\n", IO.binread("a")) } end if /mswin|mingw/ =~ RUBY_PLATFORM def test_default_mode_on_unix with_tmpdir { - open("a", "w") {|f| f.puts} + open("a", "w") {|f| f.write "\n"} assert_equal("\n", IO.binread("a")) } end unless /mswin|mingw/ =~ RUBY_PLATFORM def test_text_mode with_tmpdir { - open("a", "wt") {|f| f.puts} - assert_equal("\r\n", IO.binread("a")) + open("a", "wb") {|f| f.write "\r\n"} + assert_equal("\n", open("a", "rt"){|f| f.read}) } end def test_binary_mode with_tmpdir { - open("a", "wb") {|f| f.puts} - assert_equal("\n", IO.binread("a")) + open("a", "wb") {|f| f.write "\r\n"} + assert_equal("\r\n", open("a", "rb"){|f| f.read}) } end end |