From 286615d430e25754f26c352697f5d40ee24c9693 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 30 Jan 2011 03:53:44 +0000 Subject: * enc/emacs_mule.c (emacsmule_islead): fix inverse condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_m17n.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index b6dac01017..8a945481c3 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1106,6 +1106,18 @@ class TestM17N < Test::Unit::TestCase s1 = s("\x81\x40") s2 = "@" assert_equal(false, s1.end_with?(s2), "#{encdump s1}.end_with?(#{encdump s2})") + s1orig = "\u3042\u3044" + s2orig = "\u3044" + Encoding.list.each do |enc| + next if enc.dummy? + begin + s1 = s1orig.encode(enc) + s2 = s2orig.encode(enc) + rescue + else + assert_equal(true, s1.end_with?(s2), "#{encdump s1}.end_with?(#{encdump s2})") + end + end end def test_each_line -- cgit v1.2.3