зеркало из https://github.com/github/ruby.git
* add test for Encoding#names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c86ce094e2
Коммит
1339a862e5
|
@ -14,6 +14,15 @@ class TestEncoding < Test::Unit::TestCase
|
|||
assert_equal(e, Encoding.find(e.name.downcase))
|
||||
end
|
||||
end
|
||||
|
||||
def test_enc_names
|
||||
aliases = Encoding.aliases
|
||||
aliases.each do |a, en|
|
||||
e = Encoding.find(a)
|
||||
assert_equal(e.name, en)
|
||||
assert(e.names.include?(a))
|
||||
end
|
||||
end
|
||||
|
||||
# Test that Encoding objects can't be copied
|
||||
# And that they can be compared by object_id
|
||||
|
|
Загрузка…
Ссылка в новой задаче