X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fruby.git;a=blobdiff_plain;f=test%2Ftest-ids.rb;fp=test%2Ftest-ids.rb;h=c4237294dcad29da64364a82a4f3050999a85a7a;hp=435d2f2feff9adedeb9620462d1cc6c95f2fddc9;hb=5f691f77eafbb6df3012966d053e9d8b39c6a3ff;hpb=2e6979dc4c575c1fcace46446e6a95aef346fe1b diff --git a/test/test-ids.rb b/test/test-ids.rb index 435d2f2..c423729 100755 --- a/test/test-ids.rb +++ b/test/test-ids.rb @@ -43,7 +43,6 @@ class TestIDS < Test::Unit::TestCase end def test_decompose - return assert_equal("\342\277\261\345\256\200\345\255\220", "字".ids) assert_equal("⿱宀子", "字".ids) assert_equal(CHISE::IDC_1+"宀子", "字".ids) @@ -72,9 +71,15 @@ class TestIDS < Test::Unit::TestCase assert_equal(3, de.char_length) end - def test_compose - return + def test_by_ids + cd = CHISE::ChiseDB.instance + byidsdb = cd.get_by_ids_db("ids") + assert_instance_of(CHISE::ByIDS_DB, byidsdb) + assert_equal(true, byidsdb.setup_db) + assert_equal(26519, byidsdb.decode("⿰木木")) + end + def test_compose assert_equal("⿰木木", "林".decompose) assert_equal("⿱木⿰木木", "森".ids) assert_equal("林", "⿰木木".to_ids.compose)