diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-09 07:33:55 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-09 07:33:55 +0000 |
commit | 1339a862e582e3ce72917cd2f3b1a77b94b1ad53 (patch) | |
tree | a4514976ebd3d324a911da427c3b6217464b5fc1 | |
parent | c86ce094e283f400889f4f0bc97b897e84df04ac (diff) | |
download | ruby-1339a862e582e3ce72917cd2f3b1a77b94b1ad53.tar.gz |
* add test for Encoding#names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_encoding.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb index 24000796fa..9f48d30d1d 100644 --- a/test/ruby/test_encoding.rb +++ b/test/ruby/test_encoding.rb @@ -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 |