File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed
Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 1+ package rename
2+
3+ import (
4+ "testing"
5+ )
6+
7+ func TestNewCmdRename (t * testing.T ) {
8+ tests := []struct {
9+ name string
10+ tty bool
11+ input string
12+ output RenameOptions
13+ wantErr bool
14+ errMsg string
15+ }{
16+ {
17+ name : "no argument" ,
18+ tty : true ,
19+ input : "" ,
20+ output : RenameOptions {},
21+ },
22+ {
23+ name : "argument" ,
24+ tty : true ,
25+ input : "cli/cli" ,
26+ output : RenameOptions {
27+ DestArg : "cli comand-line-interface" ,
28+ },
29+ },
30+ {
31+ name : "incorrect argument" ,
32+ tty : true ,
33+ input : "" ,
34+ output : RenameOptions {
35+ DestArg : "cli " ,
36+ },
37+ },
38+ }
39+ }
40+
Original file line number Diff line number Diff line change 88 repoForkCmd "github.com/cli/cli/v2/pkg/cmd/repo/fork"
99 gardenCmd "github.com/cli/cli/v2/pkg/cmd/repo/garden"
1010 repoListCmd "github.com/cli/cli/v2/pkg/cmd/repo/list"
11+ repoRenameCmd "github.com/cli/cli/v2/pkg/cmd/repo/rename"
1112 repoSyncCmd "github.com/cli/cli/v2/pkg/cmd/repo/sync"
1213 repoViewCmd "github.com/cli/cli/v2/pkg/cmd/repo/view"
13- repoRenameCmd "github.com/cli/cli/v2/pkg/cmd/repo/rename"
1414 "github.com/cli/cli/v2/pkg/cmdutil"
1515 "github.com/spf13/cobra"
1616)
You can’t perform that action at this time.
0 commit comments