(t *testing.T)
| 393 | } |
| 394 | |
| 395 | func TestRunValidate_JSONFormat(t *testing.T) { |
| 396 | tmpDir := createValidateTestFiles(t) |
| 397 | resetValidateFlags() |
| 398 | validateFormat = "json" |
| 399 | |
| 400 | output, err := captureValidateOutput(t, []string{tmpDir}) |
| 401 | if err != nil { |
| 402 | t.Fatalf("runValidate failed: %v", err) |
| 403 | } |
| 404 | |
| 405 | var parsed validator.ValidationResult |
| 406 | if err := json.Unmarshal([]byte(output), &parsed); err != nil { |
| 407 | t.Fatalf("failed to parse JSON: %v\noutput: %s", err, output) |
| 408 | } |
| 409 | |
| 410 | if parsed.TaskCount != 2 { |
| 411 | t.Errorf("task_count = %d, want 2", parsed.TaskCount) |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | func TestRunValidate_InvalidFormat(t *testing.T) { |
| 416 | tmpDir := createValidateTestFiles(t) |
nothing calls this directly
no test coverage detected