MCPcopy Create free account
hub / github.com/driangle/taskmd / TestOutputValidationText_Quiet

Function TestOutputValidationText_Quiet

apps/cli/internal/cli/validate_test.go:231–253  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

229}
230
231func TestOutputValidationText_Quiet(t *testing.T) {
232 result := &validator.ValidationResult{
233 Issues: []validator.ValidationIssue{},
234 TaskCount: 3,
235 }
236
237 oldStdout := os.Stdout
238 r, w, _ := os.Pipe()
239 os.Stdout = w
240
241 outputValidationText(result, true)
242
243 w.Close()
244 os.Stdout = oldStdout
245
246 var buf bytes.Buffer
247 buf.ReadFrom(r)
248 output := buf.String()
249
250 if output != "" {
251 t.Errorf("expected no output in quiet mode, got:\n%s", output)
252 }
253}
254
255func TestPrintIssue_WithTaskID(t *testing.T) {
256 issue := validator.ValidationIssue{

Callers

nothing calls this directly

Calls 1

outputValidationTextFunction · 0.85

Tested by

no test coverage detected