(t *testing.T)
| 134 | } |
| 135 | |
| 136 | func TestFormatBranchPathTruncatesPath(t *testing.T) { |
| 137 | p := &PRDPicker{} |
| 138 | |
| 139 | result := p.formatBranchPath("chief/auth", ".chief/worktrees/auth/", 30) |
| 140 | // Should contain branch but path should be truncated with … |
| 141 | if !containsSubstring(result, "chief/auth") { |
| 142 | t.Errorf("expected branch in truncated output, got: %s", result) |
| 143 | } |
| 144 | runeCount := utf8.RuneCountInString(result) |
| 145 | if runeCount > 30 { |
| 146 | t.Errorf("expected result to fit within 30 display chars, got %d: %s", runeCount, result) |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | func TestFormatBranchPathTruncatesBranch(t *testing.T) { |
| 151 | p := &PRDPicker{} |
nothing calls this directly
no test coverage detected