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

Function TestNewExecutor_Defaults

pkgs/cmd/exec_test.go:12–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestNewExecutor_Defaults(t *testing.T) {
13 executor := NewExecutor("test title", "echo", "hello")
14
15 if executor.title != "test title" {
16 t.Errorf("title = %q, want %q", executor.title, "test title")
17 }
18 if executor.command != "echo" {
19 t.Errorf("command = %q, want %q", executor.command, "echo")
20 }
21 if len(executor.args) != 1 || executor.args[0] != "hello" {
22 t.Errorf("args = %v, want [hello]", executor.args)
23 }
24 if executor.msys2Env {
25 t.Error("msys2Env should default to false")
26 }
27 if executor.msvcEnvs != "" {
28 t.Error("msvcEnvs should default to empty")
29 }
30 if executor.workDir != "" {
31 t.Error("workDir should default to empty")
32 }
33 if executor.logPath != "" {
34 t.Error("logPath should default to empty")
35 }
36}
37
38func TestExecutor_BuilderChain(t *testing.T) {
39 executor := NewExecutor("title", "cmd").

Callers

nothing calls this directly

Calls 2

NewExecutorFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected