(t *testing.T)
| 116 | } |
| 117 | |
| 118 | func TestCheckmake_WithCustomFormatFlag(t *testing.T) { |
| 119 | out := captureOutput(func() { |
| 120 | cmd := newRootCmd() |
| 121 | cmd.SilenceErrors = true |
| 122 | cmd.SetArgs([]string{ |
| 123 | "--format", "{{.Rule}} on {{.LineNumber}}", |
| 124 | "../../fixtures/missing_phony.make", |
| 125 | }) |
| 126 | _ = cmd.Execute() |
| 127 | }) |
| 128 | |
| 129 | t.Logf("custom format output:\n%s", out) |
| 130 | |
| 131 | require.NotEmpty(t, out, "output should not be empty for custom format") |
| 132 | |
| 133 | // There are three expected rules in missing_phony.make: phonydeclared and minphony twice |
| 134 | assert.Contains(t, out, "phonydeclared on 16") |
| 135 | assert.Contains(t, out, "minphony on 22") |
| 136 | } |
| 137 | |
| 138 | func TestCheckmake_DebugLogsMakefilesPassed(t *testing.T) { |
| 139 | var logBuf bytes.Buffer |
nothing calls this directly
no test coverage detected