Skip to content

Commit

Permalink
Added a test for help flag not being captured
Browse files Browse the repository at this point in the history
  • Loading branch information
sledigabel committed Jul 20, 2023
1 parent c244149 commit 2566158
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/foreach/foreach_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ func TestParseForEachArgs(t *testing.T) {
ExpectedRepoFileName: "example.txt",
ExpectedHelpFlag: true,
},
{
Name: "Help flag is not triggered from a subsequent command",
Args: []string{"command", "--help"},
ExpectedCommand: []string{"command", "--help"},
ExpectedRepoFileName: "repos.txt",
ExpectedHelpFlag: false,
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 2566158

Please sign in to comment.