diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-16 09:45:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-16 09:45:00 +0000 |
commit | 3341db313aeb9964e731ca0b2113456ea7303e23 (patch) | |
tree | 1641edd6e4e4fbe5baeb64e82ea64f767673ebac /test | |
parent | c0cce2938c4e19508d1cd6412889c669da04cd7b (diff) | |
download | ruby-3341db313aeb9964e731ca0b2113456ea7303e23.tar.gz |
test_string.rb: Bug #8642
* test/ruby/test_string.rb (test_split): test for r41994.
[ruby-core:56036] [Bug #8642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_string.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 9db3d2cb0f..83bf78adc9 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1320,6 +1320,17 @@ class TestString < Test::Unit::TestCase s = S("a:".force_encoding(enc)) assert_equal([enc]*2, s.split(":", 2).map(&:encoding), bug6206) end + + bug8642 = '[ruby-core:56036] [Bug #8642]' + [ + Encoding::UTF_16BE, Encoding::UTF_16LE, + Encoding::UTF_32BE, Encoding::UTF_32LE, + ].each do |enc| + s = S("abc,def".encode(enc)) + assert_equal(["abc", "def"].map {|c| c.encode(enc)}, + s.split(",".encode(enc)), + "#{bug8642} in #{enc.name}") + end end def test_squeeze |