MCPcopy
hub / github.com/go-task/task / TestPrintAllWithSpaces

Function TestPrintAllWithSpaces

internal/summary/summary_test.go:166–188  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

164}
165
166func TestPrintAllWithSpaces(t *testing.T) {
167 t.Parallel()
168
169 buffer, l := createDummyLogger()
170
171 t1 := &ast.Task{Task: "t1"}
172 t2 := &ast.Task{Task: "t2"}
173 t3 := &ast.Task{Task: "t3"}
174
175 tasks := ast.NewTasks()
176 tasks.Set("t1", t1)
177 tasks.Set("t2", t2)
178 tasks.Set("t3", t3)
179
180 summary.PrintTasks(&l,
181 &ast.Taskfile{Tasks: tasks},
182 []string{"t1", "t2", "t3"},
183 )
184
185 assert.True(t, strings.HasPrefix(buffer.String(), "task: t1"))
186 assert.Contains(t, buffer.String(), "\n(task does not have description or summary)\n\n\ntask: t2")
187 assert.Contains(t, buffer.String(), "\n(task does not have description or summary)\n\n\ntask: t3")
188}

Callers

nothing calls this directly

Calls 5

SetMethod · 0.95
NewTasksFunction · 0.92
PrintTasksFunction · 0.92
createDummyLoggerFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…