(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func TestMain_execWithExitStatus_commandArgs(t *testing.T) { |
| 59 | StubCommandLineArgs("nosoupforyou") |
| 60 | |
| 61 | execStdOut := WithStdoutCaptured(func() { |
| 62 | result := execWithExitStatus() |
| 63 | assert.Equal(t, 1, result.exitStatusCode) |
| 64 | assert.Equal(t, true, result.shouldExit) |
| 65 | }) |
| 66 | |
| 67 | assert.Equal(t, "Error: unknown command: nosoupforyou\n", execStdOut) |
| 68 | } |
| 69 | |
| 70 | func TestMain_allCheck_versionFlag(t *testing.T) { |
| 71 | if os.Getenv("GO_TEST_SUBPROCESS") == "1" { |
nothing calls this directly
no test coverage detected