diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-30 03:53:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-30 03:53:44 +0000 |
commit | 286615d430e25754f26c352697f5d40ee24c9693 (patch) | |
tree | 740d248c5775b903b323b0975afe994111638864 /test/ruby/test_m17n.rb | |
parent | 2a5177e757ca0e26c1c05c0c05b37f161513e5e6 (diff) | |
download | ruby-286615d430e25754f26c352697f5d40ee24c9693.tar.gz |
* 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
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r-- | test/ruby/test_m17n.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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 |