mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
d163179c3e
commit
9cdc7f9db0
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Thu Sep 1 10:20:50 2011 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Thu Sep 1 09:27:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
Thu Sep 1 09:27:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* variable.c (rb_autoloading_value) Fix the order of definitions.
|
* variable.c (rb_autoloading_value) Fix the order of definitions.
|
||||||
|
|
|
@ -2072,29 +2072,29 @@ EOT
|
||||||
|
|
||||||
def test_default_mode_on_dosish
|
def test_default_mode_on_dosish
|
||||||
with_tmpdir {
|
with_tmpdir {
|
||||||
open("a", "w") {|f| f.puts}
|
open("a", "w") {|f| f.write "\n"}
|
||||||
assert_equal("\r\n", IO.binread("a"))
|
assert_equal("\r\n", IO.binread("a"))
|
||||||
}
|
}
|
||||||
end if /mswin|mingw/ =~ RUBY_PLATFORM
|
end if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||||
|
|
||||||
def test_default_mode_on_unix
|
def test_default_mode_on_unix
|
||||||
with_tmpdir {
|
with_tmpdir {
|
||||||
open("a", "w") {|f| f.puts}
|
open("a", "w") {|f| f.write "\n"}
|
||||||
assert_equal("\n", IO.binread("a"))
|
assert_equal("\n", IO.binread("a"))
|
||||||
}
|
}
|
||||||
end unless /mswin|mingw/ =~ RUBY_PLATFORM
|
end unless /mswin|mingw/ =~ RUBY_PLATFORM
|
||||||
|
|
||||||
def test_text_mode
|
def test_text_mode
|
||||||
with_tmpdir {
|
with_tmpdir {
|
||||||
open("a", "wt") {|f| f.puts}
|
open("a", "wb") {|f| f.write "\r\n"}
|
||||||
assert_equal("\r\n", IO.binread("a"))
|
assert_equal("\n", open("a", "rt"){|f| f.read})
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_binary_mode
|
def test_binary_mode
|
||||||
with_tmpdir {
|
with_tmpdir {
|
||||||
open("a", "wb") {|f| f.puts}
|
open("a", "wb") {|f| f.write "\r\n"}
|
||||||
assert_equal("\n", IO.binread("a"))
|
assert_equal("\r\n", open("a", "rb"){|f| f.read})
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue