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

ruby-changes:16563

From: usa <ko1@a...>
Date: Tue, 6 Jul 2010 20:19:12 +0900 (JST)
Subject: [ruby-changes:16563] Ruby:r28555 (trunk): * test/ruby/test_io_m17n.rb (test_textmode_paragraph_nonasciicompat): should

usa	2010-07-06 20:18:58 +0900 (Tue, 06 Jul 2010)

  New Revision: 28555

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

  Log:
    * test/ruby/test_io_m17n.rb (test_textmode_paragraph_nonasciicompat): should
      match the modes of both end of pipe as text mode.
    
    * test/ruby/test_io_m17n.rb (test_binmode_paragraph_nonasciicompat): new test
      for binmode.

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

Index: test/ruby/test_io_m17n.rb
===================================================================
--- test/ruby/test_io_m17n.rb	(revision 28554)
+++ test/ruby/test_io_m17n.rb	(revision 28555)
@@ -1809,7 +1809,21 @@
   def test_textmode_paragraph_nonasciicompat
     bug3534 = ['[ruby-dev:41803]', '[Bug #3534]']
     r, w = IO.pipe
+    [Encoding::UTF_32BE, Encoding::UTF_32LE,
+     Encoding::UTF_16BE, Encoding::UTF_16LE,
+     Encoding::UTF_8].each do |e|
+      r.set_encoding(Encoding::US_ASCII, e)
+      w.print(bug3534[0], "\n\n\n\n", bug3534[1], "\n")
+      assert_equal((bug3534[0]+"\n\n").encode(e), r.gets(""), bug3534[0])
+      assert_equal((bug3534[1]+"\n").encode(e), r.gets(), bug3534[1])
+    end
+  end
+
+  def test_binmode_paragraph_nonasciicompat
+    bug3534 = ['[ruby-dev:41803]', '[Bug #3534]']
+    r, w = IO.pipe
     r.binmode
+    w.binmode
     [Encoding::UTF_32BE, Encoding::UTF_32LE,
      Encoding::UTF_16BE, Encoding::UTF_16LE,
      Encoding::UTF_8].each do |e|

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

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