mirror of
https://github.com/go-task/task.git
synced 2025-01-14 04:35:50 +02:00
be more specific in tests about output
This commit is contained in:
parent
5a23250d32
commit
0164bc21ea
1
task.go
1
task.go
@ -84,6 +84,7 @@ func (e *Executor) displayTaskDetails(task string) {
|
||||
if e.Taskfile.Tasks[task].Details == "" {
|
||||
e.Logger.Errf("task: There is no detailed description for task: %s", task)
|
||||
} else {
|
||||
|
||||
e.Logger.Outf(e.Taskfile.Tasks[task].Details)
|
||||
}
|
||||
}
|
||||
|
@ -582,9 +582,7 @@ func TestDetails(t *testing.T) {
|
||||
|
||||
buff.Reset()
|
||||
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "task-with-details"}))
|
||||
assert.Contains(t, buff.String(), "details of task-with-details - line 1")
|
||||
assert.Contains(t, buff.String(), "line 2")
|
||||
assert.Contains(t, buff.String(), "line 3")
|
||||
assert.Equal(t, buff.String(), "details of task-with-details - line 1\n"+"line 2\n"+"line 3\n\n")
|
||||
|
||||
assert.NotContains(t, buff.String(), "task-with-details was executed")
|
||||
assert.NotContains(t, buff.String(), "dependend-task was executed")
|
||||
|
Loading…
Reference in New Issue
Block a user