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

Function TestExecutor_BuilderChain

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

Source from the content-addressed store, hash-verified

36}
37
38func TestExecutor_BuilderChain(t *testing.T) {
39 executor := NewExecutor("title", "cmd").
40 MSYS2Env(true).
41 SetMsvcEnvs("vcvars").
42 SetWorkDir(os.TempDir()).
43 SetLogPath("test.log")
44
45 if !executor.msys2Env {
46 t.Error("msys2Env should be true")
47 }
48 if executor.msvcEnvs != "vcvars" {
49 t.Error("msvcEnvs should be 'vcvars'")
50 }
51 if executor.workDir != os.TempDir() {
52 t.Error("workDir should be set")
53 }
54 if executor.logPath != "test.log" {
55 t.Error("logPath should be 'test.log'")
56 }
57}
58
59func TestExecutor_CreateLogFile(t *testing.T) {
60 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 6

NewExecutorFunction · 0.85
SetLogPathMethod · 0.80
SetWorkDirMethod · 0.80
SetMsvcEnvsMethod · 0.80
MSYS2EnvMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected