fix brief bug

This commit is contained in:
Looly
2020-06-23 18:02:38 +08:00
parent e0e07c726f
commit 8bb47018e6
3 changed files with 12 additions and 4 deletions

View File

@@ -448,5 +448,12 @@ public class StrUtilTest {
String[] results2 = StrUtil.subBetweenAll(src2,"/*","*/");
Assert.assertEquals(0, results2.length);
}
@Test
public void briefTest(){
String str = RandomUtil.randomString(1000);
int maxLength = RandomUtil.randomInt(1000);
String brief = StrUtil.brief(str, maxLength);
Assert.assertEquals(brief.length(), maxLength);
}
}