mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-11 10:12:01 -07:00
Code cleanup: remove unnecessary string conversions (#1642)
This commit is contained in:
committed by
Junegunn Choi
parent
a1260feeed
commit
3b9dbd4146
@@ -73,7 +73,7 @@ func TestTransform(t *testing.T) {
|
||||
{
|
||||
ranges := splitNth("1,2,3")
|
||||
tx := Transform(tokens, ranges)
|
||||
if string(joinTokens(tx)) != "abc: def: ghi: " {
|
||||
if joinTokens(tx) != "abc: def: ghi: " {
|
||||
t.Errorf("%s", tx)
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ func TestTransform(t *testing.T) {
|
||||
{
|
||||
ranges := splitNth("1..2,3,2..,1")
|
||||
tx := Transform(tokens, ranges)
|
||||
if string(joinTokens(tx)) != " abc: def: ghi: def: ghi: jkl abc:" ||
|
||||
if joinTokens(tx) != " abc: def: ghi: def: ghi: jkl abc:" ||
|
||||
len(tx) != 4 ||
|
||||
tx[0].text.ToString() != " abc: def:" || tx[0].prefixLength != 0 ||
|
||||
tx[1].text.ToString() != " ghi:" || tx[1].prefixLength != 12 ||
|
||||
|
Reference in New Issue
Block a user