mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-17 02:14:53 +08:00
Enable addtional linters (#34085)
enable mirror, usestdlibbars and perfsprint part of: https://github.com/go-gitea/gitea/issues/34083 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -5,6 +5,7 @@ package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@ -100,7 +101,7 @@ func TestEllipsisString(t *testing.T) {
|
||||
{limit: 7, left: "\xef\x03\xfe\xef\x03\xfe", right: ""},
|
||||
}
|
||||
for _, c := range invalidCases {
|
||||
t.Run(fmt.Sprintf("%d", c.limit), func(t *testing.T) {
|
||||
t.Run(strconv.Itoa(c.limit), func(t *testing.T) {
|
||||
left, right := EllipsisDisplayStringX("\xef\x03\xfe\xef\x03\xfe", c.limit)
|
||||
assert.Equal(t, c.left, left, "left")
|
||||
assert.Equal(t, c.right, right, "right")
|
||||
|
Reference in New Issue
Block a user