MCPcopy
hub / github.com/urfave/cli / TestHandleExitCoder_nil

Function TestHandleExitCoder_nil

errors_test.go:12–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestHandleExitCoder_nil(t *testing.T) {
13 exitCode := 0
14 called := false
15
16 OsExiter = func(rc int) {
17 if !called {
18 exitCode = rc
19 called = true
20 }
21 }
22
23 defer func() { OsExiter = fakeOsExiter }()
24
25 HandleExitCoder(nil)
26
27 assert.Equal(t, 0, exitCode)
28 assert.False(t, called)
29}
30
31func TestHandleExitCoder_ExitCoder(t *testing.T) {
32 exitCode := 0

Callers

nothing calls this directly

Calls 1

HandleExitCoderFunction · 0.85

Tested by

no test coverage detected