mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
c86ce094e2
commit
1339a862e5
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue