(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestMain_execWithExitStatus_versionFlag(t *testing.T) { |
| 34 | StubCommandLineArgs("-V") |
| 35 | assert.True(t, *fVersion) |
| 36 | |
| 37 | execStdOut := WithStdoutCaptured(func() { |
| 38 | result := execWithExitStatus() |
| 39 | assert.Equal(t, 0, result.exitStatusCode) |
| 40 | assert.Equal(t, true, result.shouldExit) |
| 41 | }) |
| 42 | |
| 43 | assert.Regexp(t, "^Version: devel \\(.+\\)\\n$", execStdOut) |
| 44 | } |
| 45 | |
| 46 | func TestMain_execWithExitStatus_noFlag(t *testing.T) { |
| 47 | StubCommandLineArgs() |
nothing calls this directly
no test coverage detected