aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_io_m17n.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-11 08:02:36 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-11 08:02:36 +0000
commit756cd2852d8faea5139b01bfd5e596d6f9e35b14 (patch)
tree6bc79647b92e8952521ebcec674b1e9e24fd6bc9 /test/ruby/test_io_m17n.rb
parenta82d24aa8237d50a8c7d7178d0535327e7ec645c (diff)
downloadruby-756cd2852d8faea5139b01bfd5e596d6f9e35b14.tar.gz
* io.c (extract_binmode): raise error even if binmode and textmode
don't conflict. [Bug #5918] [ruby-core:42199] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r--test/ruby/test_io_m17n.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index becafaa201..24a7f16947 100644
--- a/test/ruby/test_io_m17n.rb
+++ b/test/ruby/test_io_m17n.rb
@@ -1406,9 +1406,12 @@ EOT
end
def test_both_textmode_binmode
- assert_raise(ArgumentError) { open("not-exist", "r", :textmode=>true, :binmode=>true) }
- assert_raise(ArgumentError) { open("not-exist", "rt", :binmode=>true) }
- assert_raise(ArgumentError) { open("not-exist", "rb", :textmode=>true) }
+ bug5918 = '[ruby-core:42199]'
+ assert_raise(ArgumentError, bug5918) { open("not-exist", "r", :textmode=>true, :binmode=>true) }
+ assert_raise(ArgumentError, bug5918) { open("not-exist", "rt", :binmode=>true) }
+ assert_raise(ArgumentError, bug5918) { open("not-exist", "rt", :binmode=>false) }
+ assert_raise(ArgumentError, bug5918) { open("not-exist", "rb", :textmode=>true) }
+ assert_raise(ArgumentError, bug5918) { open("not-exist", "rb", :textmode=>false) }
end
def test_textmode_decode_universal_newline_read