summaryrefslogtreecommitdiffstats
path: root/test/ruby
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
commit4d119aa64fe96eb77342566b0a2c7f7ffbcfd5bf (patch)
tree64c2f97d6e2ff9566ba57a1b1c38dc30221c19a2 /test/ruby
parentea79558e2e8f30a60e7a144d00dc8a48bd12c238 (diff)
downloadruby-4d119aa64fe96eb77342566b0a2c7f7ffbcfd5bf.tar.gz
ruby-4d119aa64fe96eb77342566b0a2c7f7ffbcfd5bf.tar.xz
ruby-4d119aa64fe96eb77342566b0a2c7f7ffbcfd5bf.zip
* test/ruby/test_argf.rb (test_binmode): wrong test. fixed.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 695b6f219..7ab9b250d 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