(t *testing.T)
| 1188 | } |
| 1189 | |
| 1190 | func TestColorModeWithFullBin(t *testing.T) { |
| 1191 | // Regression: color mode must be applied even when build.full_bin is set, |
| 1192 | // because preprocess returns early after FullBin is processed. |
| 1193 | original := color.NoColor |
| 1194 | t.Cleanup(func() { color.NoColor = original }) |
| 1195 | |
| 1196 | cfg := defaultConfig() |
| 1197 | cfg.Build.FullBin = "./tmp/main" |
| 1198 | cfg.Color.Mode = "never" |
| 1199 | if err := cfg.preprocess(nil); err != nil { |
| 1200 | t.Fatalf("unexpected error: %v", err) |
| 1201 | } |
| 1202 | if !color.NoColor { |
| 1203 | t.Fatal("color.NoColor should be true when mode=never and full_bin is set") |
| 1204 | } |
| 1205 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…