(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func 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 | |
| 59 | func TestExecutor_CreateLogFile(t *testing.T) { |
| 60 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected