use exit errors in uts
This commit is contained in:
parent
58450552ee
commit
5d528e2052
@ -1669,7 +1669,7 @@ func TestHandleExitCoder_Default(t *testing.T) {
|
||||
}
|
||||
|
||||
ctx := NewContext(app, fs, nil)
|
||||
app.handleExitCoder(ctx, errors.New("Default Behavior Error"))
|
||||
app.handleExitCoder(ctx, NewExitError("Default Behavior Error", 42))
|
||||
|
||||
output := fakeErrWriter.String()
|
||||
if !strings.Contains(output, "Default") {
|
||||
@ -1689,7 +1689,7 @@ func TestHandleExitCoder_Custom(t *testing.T) {
|
||||
}
|
||||
|
||||
ctx := NewContext(app, fs, nil)
|
||||
app.handleExitCoder(ctx, errors.New("Default Behavior Error"))
|
||||
app.handleExitCoder(ctx, NewExitError("Default Behavior Error", 42))
|
||||
|
||||
output := fakeErrWriter.String()
|
||||
if !strings.Contains(output, "Custom") {
|
||||
|
Loading…
Reference in New Issue
Block a user