summaryrefslogtreecommitdiff
path: root/test/nkf
diff options
context:
space:
mode:
Diffstat (limited to 'test/nkf')
-rw-r--r--test/nkf/test_kconv.rb7
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