Implement Float64Flag. See #46

This commit is contained in:
Katrina Owen
2013-12-03 05:42:09 -08:00
parent 41fe2d8682
commit 2ec51afe91
4 changed files with 72 additions and 0 deletions

View File

@@ -65,6 +65,26 @@ func TestIntFlagHelpOutput(t *testing.T) {
}
}
var float64FlagTests = []struct {
name string
expected string
}{
{"help", "--help '0'\t"},
{"h", "-h '0'\t"},
}
func TestFloat64FlagHelpOutput(t *testing.T) {
for _, test := range float64FlagTests {
flag := cli.Float64Flag{Name: test.name}
output := flag.String()
if output != test.expected {
t.Errorf("%s does not match %s", output, test.expected)
}
}
}
func TestParseMultiString(t *testing.T) {
(&cli.App{
Flags: []cli.Flag{