|
|
@@ -153,26 +153,26 @@ func TestGetCommand(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func TestIgnoreHelpCommands(t *testing.T) {
|
|
|
+func TestKeepHelpCommands(t *testing.T) {
|
|
|
testCases := []struct {
|
|
|
name string
|
|
|
args []string
|
|
|
expected string
|
|
|
}{
|
|
|
{
|
|
|
- name: "help",
|
|
|
- args: []string{"--help"},
|
|
|
- expected: "",
|
|
|
+ name: "run with help flag",
|
|
|
+ args: []string{"run", "--help"},
|
|
|
+ expected: "run --help",
|
|
|
},
|
|
|
{
|
|
|
- name: "help on run",
|
|
|
- args: []string{"run", "--help"},
|
|
|
- expected: "",
|
|
|
+ name: "with help flag before-after commands",
|
|
|
+ args: []string{"compose", "--help", "up"},
|
|
|
+ expected: "compose --help up",
|
|
|
},
|
|
|
{
|
|
|
- name: "help on compose up",
|
|
|
- args: []string{"compose", "up", "--help"},
|
|
|
- expected: "",
|
|
|
+ name: "help flag",
|
|
|
+ args: []string{"--help"},
|
|
|
+ expected: "--help",
|
|
|
},
|
|
|
}
|
|
|
|