Skip to content

Commit 60cd70b

Browse files
committed
Tests rule 4.2: Q → G, Z → S, M → N
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1298645 13f79535-47bb-0310-9956-ffa450edef68
1 parent a68102b commit 60cd70b

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,23 @@ public void testRule4Dot1() throws EncoderException {
293293
}
294294
}
295295

296+
/**
297+
* Tests rule 4.2: Q → G, Z → S, M → N
298+
*
299+
* @throws EncoderException
300+
*/
301+
@Test
302+
public void testRule4Dot2() throws EncoderException {
303+
List<String[]> testValues =
304+
Arrays.asList(
305+
new String[] { "XQ", "XG" },
306+
new String[] { "XZ", "X" },
307+
new String[] { "XM", "XN" });
308+
for (String[] arr : testValues) {
309+
Assert.assertEquals("Problem with " + arr[0], arr[1], this.fullNysiis.encode(arr[0]));
310+
}
311+
}
312+
296313
/**
297314
* Tests rule 5: If last character is S, remove it.
298315
*

0 commit comments

Comments
 (0)