Skip to content

Commit

Permalink
Add test for parse config validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
blakerouse committed Jan 17, 2020
1 parent 5007476 commit fdebcfd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions parse/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ import (
"github.com/stretchr/testify/assert"
)

func TestParseWithObjectButNoArrayErrors(t *testing.T) {
_, err := ValueWithConfig("", Config{
Array: false,
Object: true,
StringDQuote: true,
StringSQuote: true,
})
if err == nil {
t.Error("should have failed")
}
}

func TestFlagValueParsingWithAll(t *testing.T) {
tests := []struct {
input string
Expand Down

0 comments on commit fdebcfd

Please sign in to comment.