mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix test
This commit is contained in:
parent
9a69843f5e
commit
86aba711f1
@ -3,6 +3,7 @@ package cn.hutool.core.util;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.lang.Console;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
@ -677,6 +678,13 @@ public class StrUtilTest {
|
||||
Assert.assertEquals("这是This一", ret);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void truncateUtf8Test3() {
|
||||
final String str = "一二三四";
|
||||
final String ret = StrUtil.truncateUtf8(str, 11);
|
||||
Assert.assertEquals("一二...", ret);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void truncateByByteLengthTest() {
|
||||
final String str = "This is English";
|
||||
|
Loading…
Reference in New Issue
Block a user