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

ruby-changes:5894

From: usa <ko1@a...>
Date: Wed, 18 Jun 2008 14:55:02 +0900 (JST)
Subject: [ruby-changes:5894] Ruby:r17402 (trunk): * test/ruby/test_argf.rb (test_binmode): wrong test. fixed.

usa	2008-06-18 14:52:32 +0900 (Wed, 18 Jun 2008)

  New Revision: 17402

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

  Log:
    * test/ruby/test_argf.rb (test_binmode): wrong test. fixed.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_argf.rb?r1=17402&r2=17401&diff_format=u

Index: test/ruby/test_argf.rb
===================================================================
--- test/ruby/test_argf.rb	(revision 17401)
+++ test/ruby/test_argf.rb	(revision 17402)
@@ -203,7 +203,7 @@
       w.puts "  puts line.chomp + '.new'"
       w.puts "end"
       w.close
-      assert_match(/Can't rename .* to .*: .*. skipping file/, e.read)
+      assert_match(/Can't rename .* to .*: .*. skipping file/, e.read) #'
       assert_equal("", r.read)
       assert_equal("foo\nbar\nbaz\n", File.read(t.path))
     end
@@ -642,9 +642,14 @@
   end
 
   def test_binmode
-    ruby('-e', "ARGF.binmode; puts ARGF.read", @t1.path, @t2.path, @t3.path) do |f|
-      assert_equal("1\n2\n3\n4\n5\n6\n", f.read)
+    r = ""
+    @tmps.each do |f|
+      r << IO.read(f.path, mode:"rb")
     end
+    ruby('-e', "ARGF.binmode; STDOUT.binmode; puts ARGF.read", @t1.path, @t2.path, @t3.path) do |f|
+      f.binmode
+      assert_equal(r, f.read)
+    end
   end
 
   def test_skip

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

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