1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2013-07-16 09:45:00 +00:00
parent c0cce2938c
commit 3341db313a

View file

@ -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