зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
2a5177e757
Коммит
286615d430
|
@ -1,3 +1,7 @@
|
|||
Sun Jan 30 12:53:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* enc/emacs_mule.c (emacsmule_islead): fix inverse condition.
|
||||
|
||||
Sun Jan 30 09:37:25 2011 Yutaka Kanemoto <kanemoto@ruby-lang.org>
|
||||
|
||||
* io.c (struct argf): char behaves like an unsigned char
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "regint.h"
|
||||
|
||||
|
||||
#define emacsmule_islead(c) ((UChar )((c) - 0x81) > 0x9d - 0x81)
|
||||
#define emacsmule_islead(c) ((UChar )((c) - 0x81) < 0x9e - 0x81)
|
||||
|
||||
/*
|
||||
CHARACTER := ASCII_CHAR | MULTIBYTE_CHAR
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче