(t *testing.T)
| 177 | } |
| 178 | |
| 179 | func TestInteractiveCommands(t *testing.T) { |
| 180 | type interactiveTestcase struct { |
| 181 | input string |
| 182 | want map[string]string |
| 183 | } |
| 184 | |
| 185 | testcases := []interactiveTestcase{ |
| 186 | { |
| 187 | "top 10 --cum focus1 -ignore focus2", |
| 188 | map[string]string{ |
| 189 | "nodecount": "10", |
| 190 | "sort": "cum", |
| 191 | "focus": "focus1|focus2", |
| 192 | "ignore": "ignore", |
| 193 | }, |
| 194 | }, |
| 195 | { |
| 196 | "top10 --cum focus1 -ignore focus2", |
| 197 | map[string]string{ |
| 198 | "nodecount": "10", |
| 199 | "sort": "cum", |
| 200 | "focus": "focus1|focus2", |
| 201 | "ignore": "ignore", |
| 202 | }, |
| 203 | }, |
| 204 | { |
| 205 | "dot", |
| 206 | map[string]string{ |
| 207 | "nodecount": "80", |
| 208 | "sort": "flat", |
| 209 | }, |
| 210 | }, |
| 211 | { |
| 212 | "tags -ignore1 -ignore2 focus1 >out", |
| 213 | map[string]string{ |
| 214 | "nodecount": "80", |
| 215 | "sort": "flat", |
| 216 | "output": "out", |
| 217 | "tagfocus": "focus1", |
| 218 | "tagignore": "ignore1|ignore2", |
| 219 | }, |
| 220 | }, |
| 221 | { |
| 222 | "weblist find -test", |
| 223 | map[string]string{ |
| 224 | "granularity": "addresses", |
| 225 | "noinlines": "false", |
| 226 | "nodecount": "0", |
| 227 | "sort": "flat", |
| 228 | "ignore": "test", |
| 229 | }, |
| 230 | }, |
| 231 | { |
| 232 | "callgrind fun -ignore >out", |
| 233 | map[string]string{ |
| 234 | "granularity": "addresses", |
| 235 | "nodecount": "0", |
| 236 | "sort": "flat", |
nothing calls this directly
no test coverage detected
searching dependent graphs…