1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/nkf/nkf-utf8/{nkf.c, utf8tbl.c}: Update nkf.

* ext/nkf/nkf.c: fix documents.

* ext/nkf/lib/kconv.rb: fix documents.
  (Kconv.is*): use valid_encoding?.
  (Kconv.isjis): defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-01-01 15:22:25 +00:00
parent 5f41f87d2b
commit 7d847f7c37
6 changed files with 801 additions and 867 deletions

View file

@ -25,7 +25,7 @@ class TestKconv < Test::Unit::TestCase
def test_eucjp
assert(@euc_str.dup.force_encoding(nil).iseuc)
assert(@euc_str.iseuc)
assert_equal(::Kconv::EUC, Kconv.guess(@euc_str))
assert_equal(@euc_str, @euc_str.toeuc)
assert_equal(@euc_str, @sjis_str.toeuc)
@ -37,7 +37,7 @@ class TestKconv < Test::Unit::TestCase
assert_equal(@euc_str, @jis_str.kconv(::NKF::EUC))
end
def test_shiftjis
assert(@sjis_str.dup.force_encoding(nil).issjis)
assert(@sjis_str.issjis)
assert_equal(::Kconv::SJIS, Kconv.guess(@sjis_str))
assert_equal(@sjis_str, @euc_str.tosjis)
assert_equal(@sjis_str, @sjis_str.tosjis)
@ -49,7 +49,7 @@ class TestKconv < Test::Unit::TestCase
assert_equal(@sjis_str, @jis_str.kconv(::NKF::SJIS))
end
def test_utf8
assert(@utf8_str.dup.force_encoding(nil).isutf8)
assert(@utf8_str.isutf8)
assert_equal(::Kconv::UTF8, Kconv.guess(@utf8_str))
assert_equal(@utf8_str, @euc_str.toutf8)
assert_equal(@utf8_str, @sjis_str.toutf8)