mirror of
https://github.com/spf13/cobra
synced 2025-05-07 13:57:21 +00:00
remove unused field 'tc'
This commit is contained in:
parent
26d6a0220b
commit
c312af1143
1 changed files with 12 additions and 13 deletions
|
@ -1596,7 +1596,6 @@ type calledAsTestcase struct {
|
|||
call string
|
||||
want string
|
||||
epm bool
|
||||
tc bool
|
||||
}
|
||||
|
||||
func (tc *calledAsTestcase) test(t *testing.T) {
|
||||
|
@ -1635,18 +1634,18 @@ func (tc *calledAsTestcase) test(t *testing.T) {
|
|||
|
||||
func TestCalledAs(t *testing.T) {
|
||||
tests := map[string]calledAsTestcase{
|
||||
"find/no-args": {nil, "parent", "parent", false, false},
|
||||
"find/real-name": {[]string{"child1"}, "child1", "child1", false, false},
|
||||
"find/full-alias": {[]string{"that"}, "child2", "that", false, false},
|
||||
"find/part-no-prefix": {[]string{"thi"}, "", "", false, false},
|
||||
"find/part-alias": {[]string{"thi"}, "child1", "this", true, false},
|
||||
"find/conflict": {[]string{"th"}, "", "", true, false},
|
||||
"traverse/no-args": {nil, "parent", "parent", false, true},
|
||||
"traverse/real-name": {[]string{"child1"}, "child1", "child1", false, true},
|
||||
"traverse/full-alias": {[]string{"that"}, "child2", "that", false, true},
|
||||
"traverse/part-no-prefix": {[]string{"thi"}, "", "", false, true},
|
||||
"traverse/part-alias": {[]string{"thi"}, "child1", "this", true, true},
|
||||
"traverse/conflict": {[]string{"th"}, "", "", true, true},
|
||||
"find/no-args": {nil, "parent", "parent", false},
|
||||
"find/real-name": {[]string{"child1"}, "child1", "child1", false},
|
||||
"find/full-alias": {[]string{"that"}, "child2", "that", false},
|
||||
"find/part-no-prefix": {[]string{"thi"}, "", "", false},
|
||||
"find/part-alias": {[]string{"thi"}, "child1", "this", true},
|
||||
"find/conflict": {[]string{"th"}, "", "", true},
|
||||
"traverse/no-args": {nil, "parent", "parent", false},
|
||||
"traverse/real-name": {[]string{"child1"}, "child1", "child1", false},
|
||||
"traverse/full-alias": {[]string{"that"}, "child2", "that", false},
|
||||
"traverse/part-no-prefix": {[]string{"thi"}, "", "", false},
|
||||
"traverse/part-alias": {[]string{"thi"}, "child1", "this", true},
|
||||
"traverse/conflict": {[]string{"th"}, "", "", true},
|
||||
}
|
||||
|
||||
for name, tc := range tests {
|
||||
|
|
Loading…
Add table
Reference in a new issue