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

ruby-changes:15895

From: yugui <ko1@a...>
Date: Sun, 16 May 2010 21:17:03 +0900 (JST)
Subject: [ruby-changes:15895] Ruby:r27835 (ruby_1_9_2): merges r27762 from trunk into ruby_1_9_2.

yugui	2010-05-16 21:15:32 +0900 (Sun, 16 May 2010)

  New Revision: 27835

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

  Log:
    merges r27762 from trunk into ruby_1_9_2.
    --
    add a test.

  Modified files:
    branches/ruby_1_9_2/test/ruby/test_io_m17n.rb

Index: ruby_1_9_2/test/ruby/test_io_m17n.rb
===================================================================
--- ruby_1_9_2/test/ruby/test_io_m17n.rb	(revision 27834)
+++ ruby_1_9_2/test/ruby/test_io_m17n.rb	(revision 27835)
@@ -1775,15 +1775,22 @@
     }
   end
 
-
   def test_cbuf_select
-    with_tmpdir {
-      r, w = IO.pipe
-      w << "\r\n"
-      r.set_encoding("US-ASCII:UTF-8", :universal_newline => true)
-      r.ungetc(r.getc)
-      assert_equal([[r],[],[]], IO.select([r], nil, nil, 1))
-    }
+    r, w = IO.pipe
+    w << "\r\n"
+    r.set_encoding("US-ASCII:UTF-8", :universal_newline => true)
+    r.ungetc(r.getc)
+    assert_equal([[r],[],[]], IO.select([r], nil, nil, 1))
   end
+
+  def test_textmode_paragraphmode
+    r, w = IO.pipe
+    w << "a\n\n\nc".gsub(/\n/, "\r\n")
+    w.close
+    r.set_encoding("US-ASCII:UTF-8", :universal_newline => true)
+    assert_equal("a\n\n", r.gets(""))
+    assert_equal("c", r.gets(""), "[ruby-core:23723] (18)")
+  end
+
 end
 

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

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