Skip to content

Commit 71803c2

Browse files
committed
Add StringUtilsTrimStripTest.testStripAccentsSymbolMath()
1 parent 4d6de35 commit 71803c2

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,27 @@ void testStripAccentsKorean() {
6868
assertEquals(input, StringUtils.stripAccents(input), "Failed to handle Korean text");
6969
}
7070

71+
/**
72+
* Decomposes ligatures and digraphs per the KD column in the <a href = "https://www.unicode.org/charts/normalization/">Unicode Normalization Chart.</a>
73+
*/
74+
@Test
75+
void testStripAccentsSymbolMath() {
76+
// Noop
77+
final String lt = "<";
78+
assertEquals(lt, StringUtils.stripAccents(lt));
79+
// https://www.unicode.org/charts/normalization/chart_Symbol-Math.html
80+
assertEquals(lt, StringUtils.stripAccents("\uFE64"));
81+
assertEquals(lt, StringUtils.stripAccents("\uFF1C"));
82+
assertEquals(lt, StringUtils.stripAccents("\u226E"));
83+
// Noop
84+
final String gt = ">";
85+
assertEquals(gt, StringUtils.stripAccents(gt));
86+
// https://www.unicode.org/charts/normalization/chart_Symbol-Math.html
87+
assertEquals(gt, StringUtils.stripAccents("\uFE65"));
88+
assertEquals(gt, StringUtils.stripAccents("\uFE65"));
89+
assertEquals(gt, StringUtils.stripAccents("\u226F"));
90+
}
91+
7192
@Test
7293
void testStripAccentsTWithStroke() {
7394
assertEquals("T t", StringUtils.stripAccents("\u0166 \u0167"));

0 commit comments

Comments
 (0)