(t *testing.T)
| 1572 | } |
| 1573 | |
| 1574 | func TestCommand_SetStdout(t *testing.T) { |
| 1575 | var w bytes.Buffer |
| 1576 | |
| 1577 | cmd := &Command{ |
| 1578 | Name: "test", |
| 1579 | Writer: &w, |
| 1580 | } |
| 1581 | |
| 1582 | err := cmd.Run(buildTestContext(t), []string{"help"}) |
| 1583 | require.NoError(t, err) |
| 1584 | assert.NotZero(t, w.Len(), "Command did not write output to desired writer.") |
| 1585 | } |
| 1586 | |
| 1587 | func TestCommand_BeforeFunc(t *testing.T) { |
| 1588 | counts := &opCounts{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…