Project

General

Profile

Bug #11488 ยป string-index-include-wide-bug.patch

tomstuart (Tom Stuart), 08/25/2015 04:07 PM

View differences:

test/ruby/test_m17n.rb
assert_equal(false, e("\xa1\xa2\xa3\xa4").include?(e("\xa3")))
s = e("\xa3\xb0\xa3\xb1\xa3\xb2\xa3\xb3\xa3\xb4")
assert_equal(false, s.include?(e("\xb0\xa3")))
each_encoding("abcdef", "def") do |str, substr|
assert_equal(true, str.include?(substr))
end
end
def test_index
......
assert_nil(e("\xa1\xa2\xa3\xa4").rindex(e("\xa3")))
s = e("\xa3\xb0\xa3\xb1\xa3\xb2\xa3\xb3\xa3\xb4")
assert_raise(Encoding::CompatibilityError){s.rindex(a("\xb1\xa3"))}
each_encoding("abcdef", "def") do |str, substr|
assert_equal(3, str.index(substr))
end
end
def test_next
    (1-1/1)