From a966b61fd2064241c9a0c9624c7329b5b1569c81 Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 18 Jun 2008 05:52:32 +0000 Subject: * test/ruby/test_argf.rb (test_binmode): wrong test. fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_argf.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test/ruby/test_argf.rb') diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb index 695b6f2196..7ab9b250df 100644 --- a/test/ruby/test_argf.rb +++ b/test/ruby/test_argf.rb @@ -203,7 +203,7 @@ class TestArgf < Test::Unit::TestCase 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,8 +642,13 @@ class TestArgf < Test::Unit::TestCase 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 -- cgit v1.2.3