CLI calls should slice the first arg out before running
This commit is contained in:
parent
c2ee139973
commit
49256895cc
|
@ -74,7 +74,7 @@ func (e *Environment) Cli(args []string) int {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return command.Run(e, args)
|
return command.Run(e, args[1:])
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prints the CLI help to the UI.
|
// Prints the CLI help to the UI.
|
||||||
|
|
|
@ -6,6 +6,17 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func testEnvironment() *Environment {
|
||||||
|
return NewEnvironment()
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestEnvironment_Cli_CallsRun(t *testing.T) {
|
||||||
|
//_ := asserts.NewTestingAsserts(t, true)
|
||||||
|
|
||||||
|
// TODO: Test that the call to `Run` is done with
|
||||||
|
// proper arguments and such.
|
||||||
|
}
|
||||||
|
|
||||||
func TestEnvironment_DefaultCli_Empty(t *testing.T) {
|
func TestEnvironment_DefaultCli_Empty(t *testing.T) {
|
||||||
assert := asserts.NewTestingAsserts(t, true)
|
assert := asserts.NewTestingAsserts(t, true)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue