From 1426db8aa017ae8dc83112abd7e54c15ef14d7ef Mon Sep 17 00:00:00 2001 From: Gerald Kaszuba Date: Fri, 1 Jun 2018 12:04:35 +1000 Subject: [PATCH] Added tag test for multiple separators. --- tag_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tag_test.go b/tag_test.go index 1decec5..8abd904 100644 --- a/tag_test.go +++ b/tag_test.go @@ -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) +}