Skip to content

Commit

Permalink
Assert that explicit arg overrides default value
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfrench committed Feb 12, 2024
1 parent 6070e61 commit d765601
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions args_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,7 @@ func TestSingleOptionalArg(t *testing.T) {
arg.Value = "bar"
require.NoError(t, cmd.Run(context.Background(), []string{"foo"}))
require.Equal(t, "bar", s1)

require.NoError(t, cmd.Run(context.Background(), []string{"foo", "zbar"}))
require.Equal(t, "zbar", s1)
}

0 comments on commit d765601

Please sign in to comment.