mirror of
https://github.com/go-task/task.git
synced 2025-01-26 05:27:15 +02:00
hides commands keywoard if not present
This commit is contained in:
parent
474f27c6d3
commit
890996f595
@ -86,3 +86,19 @@ func TestPrintTaskCommandsIfPresent(t *testing.T) {
|
||||
assert.Contains(t, buffer.String(), "\n - command-2\n")
|
||||
assert.Contains(t, buffer.String(), "\n - command-3\n")
|
||||
}
|
||||
|
||||
func TestDoesNotPrintCommandIfMissing(t *testing.T) {
|
||||
buffer := &bytes.Buffer{}
|
||||
l := logger.Logger{
|
||||
Stdout: buffer,
|
||||
Stderr: buffer,
|
||||
Verbose: false,
|
||||
}
|
||||
task := &taskfile.Task{
|
||||
Cmds: []*taskfile.Cmd{},
|
||||
}
|
||||
|
||||
summary.Print(&l, task)
|
||||
|
||||
assert.NotContains(t, buffer.String(), "commands")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user