(t *testing.T)
| 136 | } |
| 137 | |
| 138 | func TestJSONHelpRealRootManifestIncludesPublicCommands(t *testing.T) { |
| 139 | RootCmd.InitDefaultHelpCmd() |
| 140 | |
| 141 | var got []string |
| 142 | for _, cmd := range publicCommandSubtree(RootCmd) { |
| 143 | got = append(got, jsonCommandManifestFor(cmd).Path) |
| 144 | } |
| 145 | want := []string{ |
| 146 | "dbxcli", |
| 147 | "account", |
| 148 | "completion", |
| 149 | "completion bash", |
| 150 | "completion fish", |
| 151 | "completion powershell", |
| 152 | "completion zsh", |
| 153 | "cp", |
| 154 | "du", |
| 155 | "get", |
| 156 | "help", |
| 157 | "login", |
| 158 | "logout", |
| 159 | "ls", |
| 160 | "mkdir", |
| 161 | "mv", |
| 162 | "put", |
| 163 | "restore", |
| 164 | "revs", |
| 165 | "rm", |
| 166 | "search", |
| 167 | "share", |
| 168 | "share list", |
| 169 | "share list folder", |
| 170 | "share list link", |
| 171 | "share-link", |
| 172 | "share-link create", |
| 173 | "share-link download", |
| 174 | "share-link info", |
| 175 | "share-link list", |
| 176 | "share-link revoke", |
| 177 | "share-link update", |
| 178 | "team", |
| 179 | "team add-member", |
| 180 | "team info", |
| 181 | "team list-groups", |
| 182 | "team list-members", |
| 183 | "team remove-member", |
| 184 | } |
| 185 | if !reflect.DeepEqual(got, want) { |
| 186 | t.Fatalf("real root manifest paths = %v, want %v", got, want) |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | func TestJSONHelpManifestFields(t *testing.T) { |
| 191 | stdout, _, err := executeJSONHelpTestRoot(t, []string{"--help", "--output=json"}) |
nothing calls this directly
no test coverage detected