Skip to content

Commit

Permalink
change readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2cjp committed Nov 16, 2011
1 parent d797124 commit d51f6db
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@ Pinyin
======

将汉字转为拼音
def test_full
def test_full
assert_equal("", Pinyin.full(nil))
assert_equal("yedongkai", Pinyin.full("叶冬开"))
assert_equal("yedongkaiyedong", Pinyin.full("叶冬开叶冬"))
assert_equal("yedongkaiabcyedong", Pinyin.full("叶冬开abc叶冬"))
end

assert_equal "yedongkai|xiedongkai", Pinyin.full("叶冬开", nil, true)
end

def test_abbr
assert_equal("cjp", Pinyin.abbr("曹靖鹏"))

assert_equal("gjp|hjp", Pinyin.abbr("红靖鹏", nil, true))
end

def test_abbr_else
assert_equal("caojp", Pinyin.abbr_else("曹靖鹏"))
end


Introduction goes here.
Expand Down

0 comments on commit d51f6db

Please sign in to comment.