diff options
Diffstat (limited to 'test/ruby/test_m17n_comb.rb')
-rw-r--r-- | test/ruby/test_m17n_comb.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb index 9de64f4912..50fe8c2233 100644 --- a/test/ruby/test_m17n_comb.rb +++ b/test/ruby/test_m17n_comb.rb @@ -318,10 +318,11 @@ class TestM17NComb < Test::Unit::TestCase def test_str_eq combination(STRINGS, STRINGS) {|s1, s2| desc_eq = "#{encdump s1} == #{encdump s2}" - if s1.ascii_only? && s2.ascii_only? && a(s1) == a(s2) - assert(s1 == s2, desc_eq) - assert(s1.eql?(s2), desc_eq) - elsif s1.encoding == s2.encoding && a(s1) == a(s2) + if a(s1) == a(s2) and + (s1.ascii_only? && s2.ascii_only? or + s1.encoding == s2.encoding or + s1.encoding == (enc = Encoding.find("ASCII-8BIT")) or + s2.encoding == enc) then assert(s1 == s2, desc_eq) assert(!(s1 != s2)) assert_equal(0, s1 <=> s2) |