diff options
-rw-r--r-- | pkg/gui/presentation/branches_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/gui/presentation/branches_test.go b/pkg/gui/presentation/branches_test.go index ba79f16ce..14012cda2 100644 --- a/pkg/gui/presentation/branches_test.go +++ b/pkg/gui/presentation/branches_test.go @@ -44,6 +44,16 @@ func Test_getBranchDisplayStrings(t *testing.T) { expected: []string{"1m", "branch_name"}, }, { + branch: &models.Branch{Name: "π_special_char", Recency: "1m"}, + itemOperation: types.ItemOperationNone, + fullDescription: false, + viewWidth: 19, + useIcons: false, + checkedOutByWorktree: false, + showDivergenceCfg: "none", + expected: []string{"1m", "π_special_cβ¦"}, // truncated, but shouldn't + }, + { branch: &models.Branch{Name: "branch_name", Recency: "1m"}, itemOperation: types.ItemOperationNone, fullDescription: false, @@ -185,6 +195,16 @@ func Test_getBranchDisplayStrings(t *testing.T) { expected: []string{"1m", "branch_naβ¦"}, }, { + branch: &models.Branch{Name: "π_special_char", Recency: "1m"}, + itemOperation: types.ItemOperationNone, + fullDescription: false, + viewWidth: 18, + useIcons: false, + checkedOutByWorktree: false, + showDivergenceCfg: "none", + expected: []string{"1m", "π_special_β¦"}, // truncated two runes too much + }, + { branch: &models.Branch{Name: "branch_name", Recency: "1m"}, itemOperation: types.ItemOperationNone, fullDescription: false, |