summaryrefslogtreecommitdiffstats
path: root/pkg/utils/formatting_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/utils/formatting_test.go')
-rw-r--r--pkg/utils/formatting_test.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkg/utils/formatting_test.go b/pkg/utils/formatting_test.go
index 3858fd2ec..5b56a9b33 100644
--- a/pkg/utils/formatting_test.go
+++ b/pkg/utils/formatting_test.go
@@ -107,22 +107,22 @@ func TestTruncateWithEllipsis(t *testing.T) {
{
"hello world !",
3,
- "...",
+ "he…",
},
{
"hello world !",
4,
- "h...",
+ "hel…",
},
{
"hello world !",
5,
- "he...",
+ "hell…",
},
{
"hello world !",
12,
- "hello wor...",
+ "hello world…",
},
{
"hello world !",
@@ -137,7 +137,7 @@ func TestTruncateWithEllipsis(t *testing.T) {
{
"大大大大",
5,
- "大...",
+ "大大…",
},
{
"大大大大",
@@ -146,6 +146,11 @@ func TestTruncateWithEllipsis(t *testing.T) {
},
{
"大大大大",
+ 1,
+ ".",
+ },
+ {
+ "大大大大",
0,
"",
},