more accurate regression reproduction

This commit is contained in:
Lynn Cyrin 2019-08-25 08:54:06 -07:00
parent e042de5cb4
commit 15dc34ea12
No known key found for this signature in database
GPG Key ID: EE9CCB427DFEC897

View File

@ -1191,12 +1191,17 @@ func TestRegression(t *testing.T) {
// setup
app := NewApp()
app.Commands = []Command{{
Name: "myCommand",
Flags: []Flag{StringFlag{Name: "someFlag"}},
Name: "command",
Flags: []Flag{
StringFlag{
Name: "flagone",
},
},
Action: func(c *Context) error { return nil },
}}
// logic under test
err := app.Run([]string{"myCLI", "myCommand", "--someFlag", "someInput", "docker", "run", "--rm", "ubuntu", "bash"})
err := app.Run([]string{"cli", "command", "--flagone", "flagvalue", "docker", "image", "ls", "--no-trunc"})
// assertions
if err != nil {