Added tag test for multiple separators.

This commit is contained in:
Gerald Kaszuba
2018-06-01 12:04:35 +10:00
committed by Alec Thomas
parent 254fa00e81
commit 1426db8aa0
+11
View File
@@ -93,3 +93,14 @@ func TestBareTagsWithJsonTag(t *testing.T) {
require.Equal(t, "\"'👌'\"", cli.Cmd.Flag)
require.Equal(t, "", cli.Cmd.Arg)
}
func TestManySeps(t *testing.T) {
var cli struct {
Arg string `arg optional default:"hi"`
}
p := mustNew(t, &cli)
_, err := p.Parse([]string{})
require.NoError(t, err)
require.Equal(t, "hi", cli.Arg)
}