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 // setup
app := NewApp() app := NewApp()
app.Commands = []Command{{ app.Commands = []Command{{
Name: "myCommand", Name: "command",
Flags: []Flag{StringFlag{Name: "someFlag"}}, Flags: []Flag{
StringFlag{
Name: "flagone",
},
},
Action: func(c *Context) error { return nil },
}} }}
// logic under test // 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 // assertions
if err != nil { if err != nil {