(t *testing.T)
| 281 | } |
| 282 | |
| 283 | func TestCheckmake_WithTextOutput(t *testing.T) { |
| 284 | out := captureOutput(func() { |
| 285 | cmd := newRootCmd() |
| 286 | cmd.SilenceErrors = true |
| 287 | cmd.SetArgs([]string{ |
| 288 | "-o", "text", |
| 289 | "../../fixtures/missing_phony.make", |
| 290 | }) |
| 291 | _ = cmd.Execute() |
| 292 | }) |
| 293 | |
| 294 | require.NotEmpty(t, out, "output should not be empty for text format") |
| 295 | |
| 296 | // Text output should contain table-like structure |
| 297 | assert.Contains(t, out, "Required target", "should mention violation description") |
| 298 | assert.Contains(t, out, "declared PHONY.", "should mention target type") |
| 299 | assert.Contains(t, out, "phonydeclared", "should mention phonydeclared error") |
| 300 | } |
| 301 | |
| 302 | func TestCheckmake_WithInvalidOutput(t *testing.T) { |
| 303 | cmd := newRootCmd() |
nothing calls this directly
no test coverage detected