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

ruby-changes:15853

From: akr <ko1@a...>
Date: Thu, 13 May 2010 21:39:55 +0900 (JST)
Subject: [ruby-changes:15853] Ruby:r27787 (trunk): add a test.

akr	2010-05-13 21:39:45 +0900 (Thu, 13 May 2010)

  New Revision: 27787

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

  Log:
    add a test.

  Modified files:
    trunk/test/ruby/test_io_m17n.rb

Index: test/ruby/test_io_m17n.rb
===================================================================
--- test/ruby/test_io_m17n.rb	(revision 27786)
+++ test/ruby/test_io_m17n.rb	(revision 27787)
@@ -1792,5 +1792,17 @@
     end
   end
 
+  def test_textmode_paragraph_binaryread
+    with_pipe("US-ASCII:UTF-8", :universal_newline => true) do |r, w|
+      r, w = IO.pipe
+      w << "a\n\n\ncdefgh".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.getc)
+      assert_equal("defgh", r.readpartial(10))
+    end
+  end
+
 end
 

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

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