This commit is contained in:
Alec Thomas
2018-06-04 13:25:12 +10:00
committed by Gerald Kaszuba
parent 48af58cefa
commit 2afd4ba47b
7 changed files with 229 additions and 137 deletions
+6 -3
View File
@@ -9,9 +9,12 @@ import (
func mustNew(t *testing.T, cli interface{}, options ...Option) *Kong {
t.Helper()
options = append([]Option{ExitFunction(func(int) {
t.Fatalf("unexpected exit()")
})}, options...)
options = append([]Option{
ExitFunction(func(int) {
t.Helper()
t.Fatalf("unexpected exit()")
}),
}, options...)
parser, err := New(cli, options...)
require.NoError(t, err)
return parser