mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
@@ -40,8 +40,16 @@ public class EscapeUtilTest {
|
||||
|
||||
@Test
|
||||
public void escapeSingleQuotesTest(){
|
||||
// 单引号不做转义
|
||||
String str = "'some text with single quotes'";
|
||||
final String s = EscapeUtil.escapeHtml4(str);
|
||||
Assert.assertEquals("'some text with single quotes'", s);
|
||||
Assert.assertEquals("'some text with single quotes'", s);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unescapeSingleQuotesTest(){
|
||||
String str = "'some text with single quotes'";
|
||||
final String s = EscapeUtil.unescapeHtml4(str);
|
||||
Assert.assertEquals("'some text with single quotes'", s);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user