MCPcopy
hub / github.com/air-verse/air / TestColorModeWithFullBin

Function TestColorModeWithFullBin

runner/config_test.go:1190–1205  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1188}
1189
1190func 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}

Callers

nothing calls this directly

Calls 2

defaultConfigFunction · 0.85
preprocessMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…