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

Function TestBuildMSYS2Command_WithArgs

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

Source from the content-addressed store, hash-verified

81}
82
83func TestBuildMSYS2Command_WithArgs(t *testing.T) {
84 var displayCmd string
85 executor := NewExecutor("", "cmake", "--build", ".", "--config", "Release")
86 cmd := executor.buildMSYS2Command(&displayCmd)
87
88 expected := "cmake --build . --config Release"
89 if displayCmd != expected {
90 t.Errorf("displayCmd = %q, want %q", displayCmd, expected)
91 }
92 if len(cmd.Args) < 3 {
93 t.Fatalf("expected at least 3 args, got: %v", cmd.Args)
94 }
95 if cmd.Args[2] != expected {
96 t.Errorf("bash command = %q, want %q", cmd.Args[2], expected)
97 }
98}
99
100func TestBuildMSYS2Command_EnvNotOverridden(t *testing.T) {
101 var displayCmd string

Callers

nothing calls this directly

Calls 2

NewExecutorFunction · 0.85
buildMSYS2CommandMethod · 0.80

Tested by

no test coverage detected