mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Fix multibyte initial characters
This commit is contained in:
committed by
Jesse Duffield
parent
253504a094
commit
6171690b00
@ -290,6 +290,16 @@ func TestLimitStr(t *testing.T) {
|
||||
limit: 3,
|
||||
want: "abc",
|
||||
},
|
||||
{
|
||||
values: "あいう",
|
||||
limit: 1,
|
||||
want: "あ",
|
||||
},
|
||||
{
|
||||
values: "あいう",
|
||||
limit: 2,
|
||||
want: "あい",
|
||||
},
|
||||
} {
|
||||
if got := LimitStr(test.values, test.limit); !assert.EqualValues(t, got, test.want) {
|
||||
t.Errorf("LimitString(%v, %d) = %v; want %v", test.values, test.limit, got, test.want)
|
||||
|
Reference in New Issue
Block a user