remove quotes for empty StringFlags

This commit is contained in:
Ryan Schmukler
2014-04-11 15:09:59 -04:00
parent 3fa24ca4f3
commit 312151dca4
2 changed files with 16 additions and 4 deletions

View File

@@ -28,16 +28,19 @@ func TestBoolFlagHelpOutput(t *testing.T) {
var stringFlagTests = []struct {
name string
value string
expected string
}{
{"help", "--help ''\t"},
{"h", "-h ''\t"},
{"help", "", "--help \t"},
{"h", "", "-h \t"},
{"h", "", "-h \t"},
{"test", "Something", "--test 'Something'\t"},
}
func TestStringFlagHelpOutput(t *testing.T) {
for _, test := range stringFlagTests {
flag := cli.StringFlag{Name: test.name}
flag := cli.StringFlag{Name: test.name, Value: test.value}
output := flag.String()
if output != test.expected {