зеркало из https://github.com/github/ruby.git
test/test-unicode_normalize.rb: added test_raise_exception_for_non_unicode_encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b3494924b6
Коммит
bdea9273ca
|
@ -1,3 +1,8 @@
|
|||
Sat Oct 25 20:01:01 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* test/test-unicode_normalize.rb: added
|
||||
test_raise_exception_for_non_unicode_encoding.
|
||||
|
||||
Sat Oct 25 19:30:30 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* test/test-unicode_normalize.rb: removed unused function.
|
||||
|
|
|
@ -148,4 +148,10 @@ class TestNormalize < Test::Unit::TestCase
|
|||
assert_equal "\u1100\u1161\u0323\u0300", "\uAC00\u0300\u0323".unicode_normalize(:nfd)
|
||||
assert_equal "\u1100\u1161\u0323\u0300", "\u1100\u1161\u0300\u0323".unicode_normalize(:nfd)
|
||||
end
|
||||
|
||||
def test_raise_exception_for_non_unicode_encoding
|
||||
assert_raise(Encoding::CompatibilityError) { "abc".force_encoding('ISO-8859-1').unicode_normalize }
|
||||
assert_raise(Encoding::CompatibilityError) { "abc".force_encoding('ISO-8859-1').unicode_normalize! }
|
||||
assert_raise(Encoding::CompatibilityError) { "abc".force_encoding('ISO-8859-1').unicode_normalized? }
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче