(t *testing.T)
| 99 | } |
| 100 | |
| 101 | func TestLayout(t *testing.T) { |
| 102 | t.Parallel() |
| 103 | |
| 104 | buffer, l := createDummyLogger() |
| 105 | task := &ast.Task{ |
| 106 | Task: "sample-task", |
| 107 | Summary: "line1\nline2\nline3\n", |
| 108 | Deps: []*ast.Dep{ |
| 109 | {Task: "dependency"}, |
| 110 | }, |
| 111 | Cmds: []*ast.Cmd{ |
| 112 | {Cmd: "command"}, |
| 113 | }, |
| 114 | } |
| 115 | |
| 116 | summary.PrintTask(&l, task) |
| 117 | |
| 118 | assert.Equal(t, expectedOutput(), buffer.String()) |
| 119 | } |
| 120 | |
| 121 | func expectedOutput() string { |
| 122 | expected := `task: sample-task |
nothing calls this directly
no test coverage detected
searching dependent graphs…