diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-07 11:47:39 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-07 11:47:39 +0000 |
commit | 85eb93d062934ef711074ec6bd1eaab33fed64aa (patch) | |
tree | db5402a679348364b1c6409587eccfa460dd85b4 /test/nkf | |
parent | 1f70a6ba67f90b20e4eb3e32786d82cd1985c89d (diff) |
* 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/trunk@30112 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 |