Merge branch 'develop' of https://github.com/txgruppi/cli into txgruppi-develop

This commit is contained in:
Dan Buch
2016-04-25 18:10:10 -04:00
11 changed files with 346 additions and 197 deletions

View File

@@ -66,10 +66,11 @@ func Test_Help_Custom_Flags(t *testing.T) {
Flags: []Flag{
BoolFlag{Name: "foo, h"},
},
Action: func(ctx *Context) {
Action: func(ctx *Context) int {
if ctx.Bool("h") != true {
t.Errorf("custom help flag not set")
}
return 0
},
}
output := new(bytes.Buffer)
@@ -95,10 +96,11 @@ func Test_Version_Custom_Flags(t *testing.T) {
Flags: []Flag{
BoolFlag{Name: "foo, v"},
},
Action: func(ctx *Context) {
Action: func(ctx *Context) int {
if ctx.Bool("v") != true {
t.Errorf("custom version flag not set")
}
return 0
},
}
output := new(bytes.Buffer)