(t *testing.T)
| 98 | } |
| 99 | |
| 100 | func 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 | |
| 116 | func TestBuildMSYS2Command_MsvcEnvsOrder(t *testing.T) { |
| 117 | executor := NewExecutor("", "make install", "DESTDIR=/tmp"). |
nothing calls this directly
no test coverage detected