(t *testing.T)
| 409 | } |
| 410 | |
| 411 | func TestVerify_All(t *testing.T) { |
| 412 | tmpDir := createVerifyTestFiles(t) |
| 413 | resetVerifyFlags() |
| 414 | taskDir = tmpDir |
| 415 | verifyTaskID = "008" |
| 416 | verifyAll = true |
| 417 | |
| 418 | output, err := captureVerifyOutput(t) |
| 419 | if err == nil { |
| 420 | t.Fatal("expected error for failing check") |
| 421 | } |
| 422 | if !errors.Is(err, ErrVerifyFailed) { |
| 423 | t.Fatalf("expected ErrVerifyFailed, got: %v", err) |
| 424 | } |
| 425 | |
| 426 | if !strings.Contains(output, "FAIL") { |
| 427 | t.Errorf("expected FAIL in output, got: %s", output) |
| 428 | } |
| 429 | // With --all, subsequent steps should run (PASS, not SKIP) |
| 430 | if !strings.Contains(output, "PASS") { |
| 431 | t.Errorf("expected PASS for subsequent steps with --all, got: %s", output) |
| 432 | } |
| 433 | if !strings.Contains(output, "1 failed") { |
| 434 | t.Errorf("expected '1 failed' in output, got: %s", output) |
| 435 | } |
| 436 | if !strings.Contains(output, "2 passed") { |
| 437 | t.Errorf("expected '2 passed' in output, got: %s", output) |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | func TestResolveProjectRoot_ReturnsAbsolutePath(t *testing.T) { |
| 442 | // resolveProjectRoot uses viper.ConfigFileUsed() to determine the project root. |
nothing calls this directly
no test coverage detected