summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-18 05:52:32 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-18 05:52:32 +0000
commita966b61fd2064241c9a0c9624c7329b5b1569c81 (patch)
tree64c2f97d6e2ff9566ba57a1b1c38dc30221c19a2 /test
parent235df5064824ab4e84f89d2208bc7437cd490ed5 (diff)
* 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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_argf.rb11
1 files changed, 8 insertions, 3 deletions
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