Modify a few test cases to cover a few lines in the float option
This commit is contained in:
parent
753c179edb
commit
306443ae81
|
@ -313,9 +313,9 @@ func TestParseShortOptionWithEqualBadValue(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestParseLongOptionMissingValue(t *testing.T) {
|
func TestParseLongOptionMissingValue(t *testing.T) {
|
||||||
opt := opts.Int("fruit", "f", 0, "")
|
opt := opts.Float("fruit-price", "f", 0, "")
|
||||||
set := opts.Set{opt}
|
set := opts.Set{opt}
|
||||||
args := []string{"--fruit"}
|
args := []string{"--fruit-price"}
|
||||||
parser := opts.NewParser(args, set, false)
|
parser := opts.NewParser(args, set, false)
|
||||||
_, err := parser.Parse()
|
_, err := parser.Parse()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -324,7 +324,7 @@ func TestParseLongOptionMissingValue(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestParseShortOptionMissingValue(t *testing.T) {
|
func TestParseShortOptionMissingValue(t *testing.T) {
|
||||||
opt := opts.Int("fruit", "f", 0, "")
|
opt := opts.Float("fruit-price", "f", 0, "")
|
||||||
set := opts.Set{opt}
|
set := opts.Set{opt}
|
||||||
args := []string{"-f"}
|
args := []string{"-f"}
|
||||||
parser := opts.NewParser(args, set, false)
|
parser := opts.NewParser(args, set, false)
|
||||||
|
|
Loading…
Reference in New Issue