root_test.go
1 package commands 2 3 import ( 4 "testing" 5 ) 6 7 func TestCommandTree(t *testing.T) { 8 printErrors := func(errs map[string][]error) { 9 if errs == nil { 10 return 11 } 12 t.Error("In Root command tree:") 13 for cmd, err := range errs { 14 t.Errorf(" In X command %s:", cmd) 15 for _, e := range err { 16 t.Errorf(" %s", e) 17 } 18 } 19 } 20 printErrors(Root.DebugValidate()) 21 }