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

Function TestBuildNativeCommand_WithArgs

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

Source from the content-addressed store, hash-verified

156}
157
158func 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
178func TestBuildNativeCommand_EnvSet(t *testing.T) {
179 var displayCmd string

Callers

nothing calls this directly

Calls 3

NewExecutorFunction · 0.85
buildNativeCommandMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected