(t *testing.T)
| 156 | } |
| 157 | |
| 158 | func TestBuildNativeCommand_WithArgs(t *testing.T) { |
| 159 | var displayCmd string |
| 160 | executor := NewExecutor("", "cmake", "--build", ".", "--config", "Release") |
| 161 | cmd := executor.buildNativeCommand(&displayCmd) |
| 162 | |
| 163 | expected := "cmake --build . --config Release" |
| 164 | if displayCmd != expected { |
| 165 | t.Errorf("displayCmd = %q, want %q", displayCmd, expected) |
| 166 | } |
| 167 | if cmd.SysProcAttr != nil { |
| 168 | t.Error("expected SysProcAttr to be nil for command with args") |
| 169 | } |
| 170 | if len(cmd.Args) < 5 { |
| 171 | t.Fatalf("expected at least 5 args, got: %v", cmd.Args) |
| 172 | } |
| 173 | if cmd.Args[0] != "cmake" { |
| 174 | t.Errorf("first arg = %q, want %q", cmd.Args[0], "cmake") |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | func TestBuildNativeCommand_EnvSet(t *testing.T) { |
| 179 | var displayCmd string |
nothing calls this directly
no test coverage detected