Merge remote-tracking branch 'origin/master' into txgruppi-develop

This commit is contained in:
Dan Buch
2016-04-27 09:30:05 -04:00
4 changed files with 72 additions and 16 deletions

View File

@@ -31,19 +31,21 @@ func TestBoolFlagHelpOutput(t *testing.T) {
var stringFlagTests = []struct {
name string
usage string
value string
expected string
}{
{"help", "", "--help \t"},
{"h", "", "-h \t"},
{"h", "", "-h \t"},
{"test", "Something", "--test \"Something\"\t"},
{"help", "", "", "--help \t"},
{"h", "", "", "-h \t"},
{"h", "", "", "-h \t"},
{"test", "", "Something", "--test \"Something\"\t"},
{"config,c", "Load configuration from `FILE`", "", "--config FILE, -c FILE \tLoad configuration from FILE"},
}
func TestStringFlagHelpOutput(t *testing.T) {
for _, test := range stringFlagTests {
flag := StringFlag{Name: test.name, Value: test.value}
flag := StringFlag{Name: test.name, Usage: test.usage, Value: test.value}
output := flag.String()
if output != test.expected {