mirror of
https://github.com/junegunn/fzf.git
synced 2026-02-09 11:11:39 +08:00
Add --ellipsis=.. option
Close #2432 Also see - #1769 - https://github.com/junegunn/fzf/pull/1844#issuecomment-586663660
This commit is contained in:
@@ -54,3 +54,13 @@ func TestRunesWidth(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestTruncate(t *testing.T) {
|
||||
truncated, width := Truncate("가나다라마", 7)
|
||||
if string(truncated) != "가나다" {
|
||||
t.Errorf("Expected: 가나다, actual: %s", string(truncated))
|
||||
}
|
||||
if width != 6 {
|
||||
t.Errorf("Expected: 6, actual: %d", width)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user