mirror of
https://github.com/spf13/cobra
synced 2025-05-07 22:07:23 +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
|
call string
|
||||||
want string
|
want string
|
||||||
epm bool
|
epm bool
|
||||||
tc bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tc *calledAsTestcase) test(t *testing.T) {
|
func (tc *calledAsTestcase) test(t *testing.T) {
|
||||||
|
@ -1635,18 +1634,18 @@ func (tc *calledAsTestcase) test(t *testing.T) {
|
||||||
|
|
||||||
func TestCalledAs(t *testing.T) {
|
func TestCalledAs(t *testing.T) {
|
||||||
tests := map[string]calledAsTestcase{
|
tests := map[string]calledAsTestcase{
|
||||||
"find/no-args": {nil, "parent", "parent", false, false},
|
"find/no-args": {nil, "parent", "parent", false},
|
||||||
"find/real-name": {[]string{"child1"}, "child1", "child1", false, false},
|
"find/real-name": {[]string{"child1"}, "child1", "child1", false},
|
||||||
"find/full-alias": {[]string{"that"}, "child2", "that", false, false},
|
"find/full-alias": {[]string{"that"}, "child2", "that", false},
|
||||||
"find/part-no-prefix": {[]string{"thi"}, "", "", false, false},
|
"find/part-no-prefix": {[]string{"thi"}, "", "", false},
|
||||||
"find/part-alias": {[]string{"thi"}, "child1", "this", true, false},
|
"find/part-alias": {[]string{"thi"}, "child1", "this", true},
|
||||||
"find/conflict": {[]string{"th"}, "", "", true, false},
|
"find/conflict": {[]string{"th"}, "", "", true},
|
||||||
"traverse/no-args": {nil, "parent", "parent", false, true},
|
"traverse/no-args": {nil, "parent", "parent", false},
|
||||||
"traverse/real-name": {[]string{"child1"}, "child1", "child1", false, true},
|
"traverse/real-name": {[]string{"child1"}, "child1", "child1", false},
|
||||||
"traverse/full-alias": {[]string{"that"}, "child2", "that", false, true},
|
"traverse/full-alias": {[]string{"that"}, "child2", "that", false},
|
||||||
"traverse/part-no-prefix": {[]string{"thi"}, "", "", false, true},
|
"traverse/part-no-prefix": {[]string{"thi"}, "", "", false},
|
||||||
"traverse/part-alias": {[]string{"thi"}, "child1", "this", true, true},
|
"traverse/part-alias": {[]string{"thi"}, "child1", "this", true},
|
||||||
"traverse/conflict": {[]string{"th"}, "", "", true, true},
|
"traverse/conflict": {[]string{"th"}, "", "", true},
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, tc := range tests {
|
for name, tc := range tests {
|
||||||
|
|
Loading…
Add table
Reference in a new issue