[前][次][番号順一覧][スレッド一覧]

ruby-changes:22491

From: naruse <ko1@a...>
Date: Sat, 11 Feb 2012 03:18:58 +0900 (JST)
Subject: [ruby-changes:22491] naruse:r34540 (ruby_1_9_3): merge revision(s) 33144:

naruse	2012-02-11 03:18:48 +0900 (Sat, 11 Feb 2012)

  New Revision: 34540

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34540

  Log:
    merge revision(s) 33144:
    
    * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
      default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/test/ruby/test_io_m17n.rb
    branches/ruby_1_9_3/version.h

Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 34539)
+++ ruby_1_9_3/ChangeLog	(revision 34540)
@@ -1,3 +1,8 @@
+Sat Feb 11 03:17:41 2012  NAKAMURA Usaku  <usa@r...>
+
+	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
+	  default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].
+
 Sat Feb 11 03:13:27 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* transcode.c: enabled econv newline option.
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 34539)
+++ ruby_1_9_3/version.h	(revision 34540)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 85
+#define RUBY_PATCHLEVEL 86
 
 #define RUBY_RELEASE_DATE "2012-02-11"
 #define RUBY_RELEASE_YEAR 2012
Index: ruby_1_9_3/test/ruby/test_io_m17n.rb
===================================================================
--- ruby_1_9_3/test/ruby/test_io_m17n.rb	(revision 34539)
+++ ruby_1_9_3/test/ruby/test_io_m17n.rb	(revision 34540)
@@ -2069,5 +2069,32 @@
     }
     assert(c.ascii_only?, "should be ascii_only #{bug4557}")
   end
+
+  def test_default_mode_on_dosish
+    with_tmpdir {
+      open("a", "w") {|f| f.puts}
+      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}
+      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"))
+    }
+  end
+
+  def test_binary_mode
+    with_tmpdir {
+      open("a", "wb") {|f| f.puts}
+      assert_equal("\n", IO.binread("a"))
+    }
+  end
 end
-

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]