(t *testing.T)
| 334 | } |
| 335 | |
| 336 | func TestAdjustLineWidth_NoTruncationNeeded(t *testing.T) { |
| 337 | w := &ttyWriter{} |
| 338 | originalDetails := "short" |
| 339 | originalTaskID := "Image foo" |
| 340 | lines := []lineData{ |
| 341 | { |
| 342 | taskID: originalTaskID, |
| 343 | status: "Pulling", |
| 344 | details: originalDetails, |
| 345 | }, |
| 346 | } |
| 347 | |
| 348 | // Wide terminal, nothing should be truncated |
| 349 | w.adjustLineWidth(lines, 5, 100) |
| 350 | |
| 351 | assert.Equal(t, originalTaskID, lines[0].taskID, "taskID should not be modified") |
| 352 | assert.Equal(t, originalDetails, lines[0].details, "details should not be modified") |
| 353 | } |
| 354 | |
| 355 | func TestAdjustLineWidth_DetailsRemovedWhenTooShort(t *testing.T) { |
| 356 | w := &ttyWriter{} |
nothing calls this directly
no test coverage detected