Skip to content

Commit

Permalink
update test codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hedzr committed Apr 20, 2024
1 parent 797fdca commit 847be71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli/worker/i_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/hedzr/cmdr/v2/builder"
"github.com/hedzr/cmdr/v2/cli"
"github.com/hedzr/cmdr/v2/examples"
"github.com/hedzr/cmdr/v2/cli/examples"
)

func cleanApp(t *testing.T, helpScreen bool) (app cli.App, ww *workerS) { //nolint:revive
Expand Down
11 changes: 5 additions & 6 deletions cmdr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

cmdr "github.com/hedzr/cmdr/v2"
"github.com/hedzr/cmdr/v2/cli"
"github.com/hedzr/cmdr/v2/testdata"

"gopkg.in/hedzr/errors.v3"
)
Expand All @@ -16,8 +15,8 @@ func TestExecNoRoot(t *testing.T) {
}
}

func TestExecSimple(t *testing.T) {
if err := cmdr.Exec(testdata.BuildCommands(true)); !errors.Iss(err, cli.ErrEmptyRootCommand) {
t.Errorf("Error: %v", err)
}
}
// func TestExecSimple(t *testing.T) {
// if err := cmdr.Exec(testdata.BuildCommands(true)); !errors.Iss(err, cli.ErrEmptyRootCommand) {
// t.Errorf("Error: %v", err)
// }
// }

0 comments on commit 847be71

Please sign in to comment.