Skip to content

Commit e65d67e

Browse files
committed
[#CODEC-57] Metaphone.metaphone(String) returns an empty string when passed the word "why".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@588074 13f79535-47bb-0310-9956-ffa450edef68
1 parent fb5e3f4 commit e65d67e

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/test/org/apache/commons/codec/language/MetaphoneTest.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,16 @@ public void testDiscardOfSCEOrSCIOrSCY() {
402402
assertEquals( "S", this.getMetaphone().metaphone("SCY") );
403403
}
404404

405-
public void testWordsWithCIA() {
406-
assertEquals( "XP", this.getMetaphone().metaphone("CIAPO") );
407-
}
405+
/**
406+
* Tests (CODEC-57) Metaphone.metaphone(String) returns an empty string when passed the word "why"
407+
*/
408+
public void testWhy() {
409+
assertEquals("H", this.getMetaphone().metaphone("WHY"));
410+
}
411+
412+
public void testWordsWithCIA() {
413+
assertEquals( "XP", this.getMetaphone().metaphone("CIAPO") );
414+
}
408415

409416
public void testTranslateOfSCHAndCH() {
410417
assertEquals( "SKTL", this.getMetaphone().metaphone("SCHEDULE") );

0 commit comments

Comments
 (0)