MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestBuildMSYS2Command_EnvNotOverridden

Function TestBuildMSYS2Command_EnvNotOverridden

pkgs/cmd/exec_windows_test.go:100–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestBuildMSYS2Command_EnvNotOverridden(t *testing.T) {
101 var displayCmd string
102 executor := NewExecutor("", "make").SetMsvcEnvs(`call vcvarsall.bat &&`)
103 cmd := executor.buildMSYS2Command(&displayCmd)
104
105 msysCount := 0
106 for _, env := range cmd.Env {
107 if strings.HasPrefix(env, "MSYSTEM=") {
108 msysCount++
109 }
110 }
111 if msysCount != 1 {
112 t.Errorf("expected exactly 1 MSYSTEM env var, got %d", msysCount)
113 }
114}
115
116func TestBuildMSYS2Command_MsvcEnvsOrder(t *testing.T) {
117 executor := NewExecutor("", "make install", "DESTDIR=/tmp").

Callers

nothing calls this directly

Calls 3

NewExecutorFunction · 0.85
SetMsvcEnvsMethod · 0.80
buildMSYS2CommandMethod · 0.80

Tested by

no test coverage detected