diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-23 12:45:17 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-23 12:45:17 +0000 |
commit | 1f849b54fbddd015cf77e05364e494157f16e4d8 (patch) | |
tree | 169281da9ed144fe291bea53316a287aa5c54638 /test/nkf | |
parent | 57eb3170450a0374dd17b30eb77a26ee4560019a (diff) |
merges r30112 from trunk into ruby_1_9_2.
--
* ext/nkf/lib/kconv.rb (String#kconv): fix typo and update rdoc.
patched by Kouhei Yanagita [ruby-dev:42696]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/nkf')
-rw-r--r-- | test/nkf/test_kconv.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/nkf/test_kconv.rb b/test/nkf/test_kconv.rb index 8581f10e4e..09c0ce803a 100644 --- a/test/nkf/test_kconv.rb +++ b/test/nkf/test_kconv.rb @@ -71,4 +71,11 @@ class TestKconv < Test::Unit::TestCase assert_equal(@jis_str, @utf8_str.kconv(::NKF::JIS)) assert_equal(@jis_str, @jis_str.kconv(::NKF::JIS)) end + def test_kconv + str = "\xc2\xa1" + %w/UTF-8 EUC-JP/.each do |enc| + s = str.dup.force_encoding(enc) + assert_equal(s, s.kconv(enc)) + end + end end |