diff --git a/cmd/foreach/foreach_test.go b/cmd/foreach/foreach_test.go index f768ca6..fb7e7b7 100644 --- a/cmd/foreach/foreach_test.go +++ b/cmd/foreach/foreach_test.go @@ -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 {