Skip to content

Commit

Permalink
Fixed #175
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Jul 19, 2021
1 parent e1ad6c3 commit 10581b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion data/surnames
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php
return array (
'万俟' => ' mò qí',
'尉迟' => ' yù chí',
Expand Down Expand Up @@ -81,4 +81,6 @@
'粘' => ' niàn',
'难' => ' nàn',
'若' => ' ruò',
'貟' => ' yùn',
'贠' => ' yùn',
);
4 changes: 2 additions & 2 deletions data/words_3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php
return array (
'鱱' => ' lì',
'鱰' => ' shu',
Expand Down Expand Up @@ -4257,7 +4257,7 @@
'貢' => ' gòng',
'財' => ' cái',
'負' => ' fù',
'貟' => ' yuán',
'貟' => ' yùn',
'貞' => ' zhēn',
'貝' => ' bèi',
'貜' => ' jué',
Expand Down
7 changes: 7 additions & 0 deletions tests/AbstractDictLoaderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@ public function testYu()
$this->assertEquals(array('lv', 'xiu', 'cai'), $this->pinyin->convert('吕秀才', \PINYIN_UMLAUT_V));
}

public function testIssue175()
{
$this->assertEquals('yùn', $this->pinyin->sentence('', PINYIN_TONE));
$this->assertEquals(['yun', 'xiu', 'cai'], $this->pinyin->name('貟秀才'));
$this->assertEquals(['yun', 'xiu', 'cai'], $this->pinyin->name('贠秀才'));
}

public function testPhrase()
{
$pinyin = $this->pinyin;
Expand Down

0 comments on commit 10581b7

Please sign in to comment.