use exit errors in uts

This commit is contained in:
Tyler Davis 2017-06-28 13:04:09 -07:00
parent 58450552ee
commit 5d528e2052

View File

@ -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") {