mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
refactoring
This commit is contained in:
@@ -26,10 +26,7 @@ func TestPrintsDependenciesIfPresent(t *testing.T) {
|
|||||||
|
|
||||||
summary.Print(&l, task)
|
summary.Print(&l, task)
|
||||||
|
|
||||||
assert.Contains(t, buffer.String(), "\ndependencies:\n")
|
assert.Contains(t, buffer.String(), "\ndependencies:\n"+" - dep1\n"+" - dep2\n"+" - dep3\n")
|
||||||
assert.Contains(t, buffer.String(), "\n - dep1\n")
|
|
||||||
assert.Contains(t, buffer.String(), "\n - dep2\n")
|
|
||||||
assert.Contains(t, buffer.String(), "\n - dep3\n")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDoesNotPrintDependenciesIfMissing(t *testing.T) {
|
func TestDoesNotPrintDependenciesIfMissing(t *testing.T) {
|
||||||
@@ -127,18 +124,17 @@ func TestFullSummary(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func expectedOutput() string {
|
func expectedOutput() string {
|
||||||
expected :=
|
expected := `task: sample-task
|
||||||
`task: sample-task
|
|
||||||
|
|
||||||
line1
|
line1
|
||||||
line2
|
line2
|
||||||
line3
|
line3
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- dependency
|
- dependency
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
- command
|
- command
|
||||||
`
|
`
|
||||||
return expected
|
return expected
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user