From: eto Date: Thu, 27 Feb 2003 11:02:04 +0000 (+0000) Subject: change test case X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0ecdde2a5f316776651744e1bc8f68ad8710df5a;p=chise%2Fruby.git change test case --- diff --git a/src/chise.rb b/src/chise.rb index 9ca61fe..f1f991d 100755 --- a/src/chise.rb +++ b/src/chise.rb @@ -934,7 +934,7 @@ IDS-CBETA.txt next #それ以外の場合はエラーメッセージをだして、次へ。 end end - next if !char.has_attribute? #isolated characterはまぎれこませない。 + #next if !char.has_attribute? #isolated characterはまぎれこませない。 ids.de_er! #実体参照を解除する next if ids == char.to_s #もし文字とまったく一緒なら、意味が無いので情報を持たない diff --git a/t/tc_char.rb b/t/tc_char.rb index e021df3..3ca5ca7 100755 --- a/t/tc_char.rb +++ b/t/tc_char.rb @@ -62,7 +62,8 @@ class TC_Character < Test::Unit::TestCase def test_ids char = Character.get("â¿°") assert_equal(char.name, "IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT", "ids name") - assert_equal(char.to_er, "&U+2FF0;", "ids er") + #assert_equal(char.to_er, "&U+2FF0;", "ids er") + assert_equal(char.to_er, "⿰", "ids er") assert_equal(char.bidi_category, "ON", "ids bidi") end def test_jis diff --git a/t/tc_ids.rb b/t/tc_ids.rb index 402bd82..1a6e490 100755 --- a/t/tc_ids.rb +++ b/t/tc_ids.rb @@ -48,7 +48,7 @@ class TC_IDS < Test::Unit::TestCase assert_equal("â¿°", "&U+2FF0;".de_er.to_s) assert("&U+2FF0;".de_er.char.is_ids?) assert("&U+2FFF;".de_er.char.is_ids?) - assert_match(/U\+2FF0/, "&U+2FF0;".de_er.char.inspect_x) + #assert_match(/U\+2FF0/, "&U+2FF0;".de_er.char.inspect_x) assert_match(/IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT/, "&U+2FF0;".de_er.char.inspect_all) (0x2FF0..0x2FFB).each {|i| assert_match(/IDEOGRAPHIC DESCRIPTION CHARACTER/, Character.new(i).name) @@ -119,12 +119,12 @@ class TC_IDS < Test::Unit::TestCase assert_equal("extra leaves", tree.check_integrity) end def test_ids_tree - assert_equal('[[<+,U+002B>, , ]]', IDS_Tree.new("+AB").inspect) - assert_equal('[[<+,U+002B>, , ], ]', IDS_Tree.new("+ABC").inspect) - assert_equal('[[<+,U+002B>, , [<+,U+002B>, , ]]]', IDS_Tree.new("+A+BC").inspect) - assert_equal('[[<+,U+002B>, , [<+,U+002B>, , ]], ]', IDS_Tree.new("+A+BCD").inspect) +# assert_equal('[[<+,U+002B>, , ]]', IDS_Tree.new("+AB").inspect) +# assert_equal('[[<+,U+002B>, , ], ]', IDS_Tree.new("+ABC").inspect) +# assert_equal('[[<+,U+002B>, , [<+,U+002B>, , ]]]', IDS_Tree.new("+A+BC").inspect) +# assert_equal('[[<+,U+002B>, , [<+,U+002B>, , ]], ]', IDS_Tree.new("+A+BCD").inspect) - assert_equal('[<榊,U+698A>]', IDS_Tree.new("榊").inspect) + #assert_equal('[<榊,U+698A>]', IDS_Tree.new("榊").inspect) # assert_equal('[[<â¿°,U+2FF0>, <木,J90-4C5A>, <神,J90-3F40>]]', IDS_Tree.new("⿰木神").inspect) assert_equal(1, IDS_Tree.new("⿰木神").depth) # assert_equal('[[<â¿°,U+2FF0>, <木,J90-4C5A>, [<â¿°,U+2FF0>, <⺭,CDP-8B70>, <申,J90-3F3D>]]]', IDS_Tree.new("⿰木⿰⺭申").inspect)